David Ellis, 41, attacked 59-year-old Alec Warburton in July at a house in Sketty, Swansea Crown Court was told.
After returning to the city from Dolwyddelan in Conwy, he fled to Ireland where he was arrested.
Ellis has admitted manslaughter but denies murder. The trial is expected to last up to three weeks.
The court was also shown a note apparently signed by Mr Warburton telling his tenants he had to go away.
The prosecution claims the note, printed at Swansea Central Library, was actually written by Mr Ellis.
Christopher Clee QC told the jury: "[Alec Warburton] was brutally murdered in his own home in Swansea.
"He was bludgeoned to death with a hammer.
"The defendant does not dispute that he killed him; he did so because he had lost his self control."
The trial continues.
A man murdered his landlord with a hammer in Swansea before travelling to north Wales and dumping his body in a disused quarry, a court has heard.