Lampard’s winner came in the 49th minute after Spain, who are also European champions, had dominated possession in the first half but failed to create any clear scoring chances.
The goal came after James Milner whipped in a freekick that Darren Bent met with a good header that hit substitute keeper Pepe Reina’s post.
As the ball bounced along the line, Lampard, winning his 90th cap and captaining England in place of his Chelsea team mate John Terry, reacted first to head the ball into the empty net from less than a metre out.
Spain striker David Villa had two chances to score after the break, sending his first effort into the side netting in the 57th minute then hitting the post with a shot from the edge of the box 16 minutes later.
The win gave England their first victory over the reigning world champions since they beat Argentina 3-1 at Wembley in 1980.
Short link: