The funeral for Lewis, who played an instrumental role in passing the Voting Rights Act of 1965, came on the same day Republican President Donald Trump suggested the Nov. 3 election could be delayed. Trump has also waged a war against mail-in ballots, a tactic critics say is aimed at suppressing votes.
"We no longer have to guess the number of jelly beans in a jar in order to cast a ballot," Obama said in the eulogy, referring to one way Black people were once disqualified at the ballot box.
"But even as we sit here, there are those in power doing their darnedest to discourage people from voting by closing polling locations and targeting minorities with restrictive ID laws and attacking our voting rights with surgical precision."
Obama also referred to reported moves to undermine "the postal service in the run-up to an election that could be dependent on mail-in ballots so people don't get sick."
Obama, joined at the funeral by two fellow former presidents, Republican George W. Bush and Democrat Bill Clinton, spoke of Lewis's rise from humble beginnings on a Troy, Alabama, farm to become a leader of the 1960s struggle for equal rights for Black Americans. Ultimately, the man known as the "conscience of Congress" never gave up his drive to make "good trouble" in the cause of justice, Obama said.
Obama and others spoke or sang in front of his casket draped in the American flag at the historic Ebenezer Baptist Church, where the Reverend Martin Luther King Jr. once preached. King, who was assassinated in 1968, had been a mentor to Lewis.
Lewis, who was first elected in 1986 to represent Georgia in the U.S. House of Representatives, died on July 17 at age 80 after a battle with pancreatic cancer. His death came at a time of reckoning across the United States over racial injustice ignited by the death of George Floyd in Minneapolis on May 25.
Obama - a Democrat who was the nation's first black president and who awarded Lewis the Presidential Medal of Freedom in 2011 - argued that the man whose sharecropping parents "picked someone else's cotton" now should be counted among the Founding Fathers.
"America was built by John Lewis. He as much as anyone in our history brought our country closer to its highest ideals," the Democratic former president said.
In his speech, Bush remembered joining Lewis in Selma, Alabama, for the 50th anniversary of the watershed 1965 march across the Edmund Pettus Bridge. "The story that began in Troy isn't ending here today, nor is the work."
The funeral capped a week of memorial services.
Lewis's coffin was escorted across the bridge on Sunday, decades after his beating there drew a national spotlight to the struggle for racial equality, including suppression of the Black vote in the South. And on Monday his casket was taken to the U.S. Capitol in Washington where it lay in state through Tuesday.
Eric Terrell, 65, of Atlanta, sat outside the church in his wheelchair, in the heat and thick air of an Atlanta summer morning, waiting to get a glimpse of former Presidents Clinton and Bush, but especially Obama. He was camped out before 6:30 a.m. so he could bow his head as Lewis's funeral procession rolled by.
And he held his homemade sign until his arms got tired. It read, "Get your ass out and vote."
"He put his life on the line in Selma so we could vote," said Terrell, who is Black. "So we better do it," he said before joining the throng of onlookers outside the church watching the services on a Jumbotron.
In an essay written shortly before his death and published in the New York Times on Thursday, Lewis called on the younger generation to get into "good trouble," using perhaps his most famous utterance about the importance of challenging inequality.
"In my life I have done all I can to demonstrate that the way of peace, the way of love and nonviolence is the more excellent way," he wrote, before invoking a famous line from King: "Now it is your turn to let freedom ring."