Rogerio, who holds the world record for goals scored by a goalkeeper, placed a free-kick in the top right corner nine minutes into the second half to put Sao Paulo 2-0 up.
The 38-year-old former Brazil goalkeeper, a reserve when his country won their record fifth title in Asia in 2002, was booked for taking off his jersey as he celebrated.
"When a goalkeeper goes on to the pitch he doesn't think about scoring a goal but it turned out the way I wanted," Rogerio told a throng of reporters after the match at a neutral venue in the city of Barueri.
Sao Paulo had gone 11 games since 2007 without beating Corinthians, but their keeper's record strike spurred his team to victory in a match riddled with chances.
"I don't care who our opponents are, but it certainly is important to our fans," said Rogerio, who secured the win by also doing his main job properly with several good saves including one with his foot from striker Liedson's bicycle kick in added time.
Corinthians had defender Alessandro sent off in the 73rd minute and striker Dentinho, who pulled a goal back in the 67th, for their second yellow card offences.
Sao Paulo striker Dagoberto, who opened the scoring four minutes before half-time, was also shown the red card after a second booking in the 68th.
Sao Paulo climbed to second in the Paulista (Sao Paulo) state championship standings, ahead of Corinthians on goal difference. Luis Felipe Scolari's Palmeiras are one point ahead at the top.
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.