The soccer ace took two of his sons, Brooklyn and Romeo, to The Sun newspaper's annual Military Awards, which recognises the contributions of troops.
Beckham applauded Flight Lieutenant Mike Anderson, who won the Most Outstanding Airman award for enduring a gun and mortar attack to reach six Afghan children, declaring, "Everyone is very proud of the guys who put their lives on the line for their country. It's a great night to honour the brave."
Prince William's wife Catherine, Duchess of Cambridge was moved to tears by the soldiers' stories, while her husband told Sergeant Ryan McCready, the recipient of the the Most Outstanding Soldier award, "You exemplify the unique qualities that make the British soldier second to none."
Walliams also presented an award and said, "It's an honour to be here. These guys really risk their lives for their country."
Other guests included McFly rocker Harry Judd, as well as singers Alesha Dixon, Myleene Klass and Peter Andre.