Spain, who are also European champions and will defend their title in Ukraine and Poland next year, displayed their now typically brilliant short-passing game in the first half although for all their dominance before the break they created few scoring chances.
The game changed after half-time when Spain coach Vicente del Bosque replaced master passer Xavi, allowing England to get a foothold after almost constantly watching Spain's magical moves.
The game swung England's way after 49 minutes when James Milner whipped in a free-kick that Aston Villa striker Darren Bent met with a powerful header that hit substitute keeper Pepe Reina's post. As the ball bounced along the line Lampard reacted first to nod into the empty net.
It was his 23rd goal for England in his 90th international on his second appearance as skipper, standing in for his Chelsea team-mate John Terry who will return to the side for Tuesday's friendly against Sweden.
It was also enough to give England their first win over Spain after three successive defeats since 2001 and only their third victory over the reigning world champions since they won the World Cup in 1966 on home soil.
Their only other victories both came at Wembley - in 1975 when they beat West Germany 2-0 and in 1980 when they overcame Argentina 3-1 - but Saturday's success was almost denied them in the final minute.
Cesc Fabregas, who replaced Xavi at half-time and was making his first appearance in London since leaving Arsenal for Barcelona in the close season, swept the ball wide of Joe Hart's left-hand post in what was Spain's best and last chance of salvation.
Beaten only three times in their last 22 matches before Saturday, Spain had finished strongly, peppering Hart's goal, but Joleon Lescott and Phil Jagielka were outstanding at the heart of the England defence.
Before Spain's desperate finale, their striker David Villa had two good chances to score, sending his first effort into the side netting in the 57th minute and then hitting the post with a shot from the edge of the box 16 minutes later.
"I don't think it was an upsetting defeat," said Spain manager Del Bosque.
"The team put in all the effort they could, they played some good football and controlled the match. We just lacked a bit of spark in the decisive area of the pitch."
Lampard, who has now pulled level on England goals with 1950s scoring hero Stan Mortensen, said: "We're very pleased, its great to beat them now. They are the best team in the world but we wont get carried away by the fact we have beaten them.
"Lets be realistic, they dominated the game. Our back four, with Scott Parker in front, were brilliant. We wont be shouting from the rooftops. We have a game against Sweden on Tuesday and the reverse might happen."
While the first half saw Spain dominate with their passing game, the second period produced the more dynamic play and England coach Fabio
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.