Kaymer struggled to a 3-over 74 in the second round to seemingly fall out of contention for the victory he needs to pass Woods. McDowell shot a 67 and was at 7-under 135. Fellow Northern Irishman Gareth Maybin was two strokes back after a 68.
Niclas Fasth of Sweden was another two shots back in third after a 66.
If Kaymer finishes outside the top two, Lee Westwood of England will take over from Woods as No. 1 -- despite not playing this weekend.
McDowell said he doesn't think Kaymer has a chance to catch up to him.
"Martin has not had the best two days out," McDowell said. "He is a world-class player and I fully expect him to have a good weekend, but the forecast is for the wind to get up which could make low scoring difficult."
McDowell and Maybin played amateur golf together as teenagers, and were the only two players to break 70 in both opening rounds at the Valderrama Club, which hosted the Ryder Cup in 1997.
"I lost a bit of contact with Gareth since our amateur days because we don't compete in too many of the same tournaments," McDowell said. "But it is no surprise to see myself and Gareth up there on the leaderboard.
"Because Valderrama is his type of golf course and my type of golf course. You have to plot your way around it, you cannot overpower and that suits us."