Arsenal’s Santi Cazorla, in the 13th minute, and Atletico Madrid defender Juanfran Torres, three minutes before half-time, were on target for Vicente Del Bosque’s team.
Colombian player Jimmy Bermudez, who since May has played for the African team, grabbed a 36th minute consolation in a game which the Spanish were urged to cancel after Equatorial Guinea had been accused of abusing human rights.
Spain suffered a setback when Xabi Alonso, playing for the national side for the first time since March after suffering a series of injuries, limped off the pitch just before the interval.
With twelve players in their squad born in Spain and with a Spanish coach in Andoni Goikoetxea, Equatorial Guinea gave a good account of themselves.
Spain will now face South Africa in Johannesburg on Tuesday at the Soccer City arena where they were crowned world champions in 2010.