The 27-year-old is now at a secure facility for assessment.
He was arrested after police were called to reports of an injured man at an address in Burges Road last night around 7.30pm.
He has now been sectioned under Section 2 of the Mental Health Act and has been taken to a secure unit for assessment.
When officers and paramedics arrived, they found a man, thought to be 68-years-old, suffering head injuries. He was pronounced dead at the scene.
He has not been named although his next of kin have been informed.
Detectives are continuing with a murder investigation and an incident room has opened at Barking under DCI Chris Jones, Homicide and Serious Crime Command.
A post-mortem was carried out earlier today at East Ham mortuary.
Any with information on the incident can call the incident room on 020 8345 3734; if you wish to remain anonymous call Crimestoppers on 0800 555 111.
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules here