Lewis was elected to Congress from Georgia after years as a civil rights activist. McCain praised him in his book, "Why Courage Matters," and said in an appearance at an evangelical church that Lewis is one of "three wise men" he would seek advice from if elected president.
In a posting on Politico, Lewis, who supports the Democratic nominee, Barack Obama, accused McCain and his running mate, Sarah Palin, of "sowing the seeds of hatred and division."
"George Wallace never threw a bomb," Lewis said. "He never fired a gun, but he created the climate and the conditions that encouraged vicious attacks against innocent Americans who were simply trying to exercise their constitutional rights."
McCain called Lewis' posting "shocking" and "beyond the pale."
"I call on Sen. Obama to immediately and personally repudiate these outrageous and divisive comments that are so clearly designed to shut down debate 24 days before the election," McCain said.
An Obama spokesman said the Illinois senator does not believe McCain is in any way comparable to Wallace. But he said Palin's rhetoric is "baseless and profoundly divisive."
Duggar sisters unveil Christian dating rules in new book
Ohio bar shooting arrested, charged with murder