The Little Britain star attempted to take his life nine years ago while battling depression, which he insists has ""blighted my adult life"".
The shock admission is chronicled in Walliams' new autobiography Camp David, in which he also recalls overdosing as a teen and slitting his wrists.
A 2003 diary entry included in the book reads, ""Just tried to hang myself. But I knew I didn't really want to die, I just didn't want to live. I took my weight with my feet and sat down. Earlier I had come close to stepping in front of a train. I am in total despair.""
Walliams also details a desperate bid he made aged 12 after he was bullied at a Sea Scouts' camp, recalling how he made a noose and ran into the woods but failed to go through with the act because he was ""too tall"".
In another shocking passage, Walliams remembers swallowing painkillers aged 18 after he was rejected by a girl, and being taken to hospital by his mum to have his stomach emptied.
The comedian also admits cutting his throat and wrists with a knife on New Year's Day in 2003, but claims, ""The determination wasn't there.""
He adds, ""Wanting to die has always been in me.""
Last month (Sep12), it emerged Walliams checked himself into rehab at the start of his career to deal with depression following the breakdown of a relationship.