Pence, speaking last, praised McCain as an "American patriot" who "served a cause greater than himself".
McCain had made clear he did not want Trump to attend his funeral services, and Trump had to be urged by aides to make a statement honor McCain and reordering the flags at half staff.
Pence says the Arizona Republican later became "one of the most unwavering advocates" of the American military ever to serve in Congress. John McCain's daughter, The View co-host Meghan McCain, might have been glaring at Vice President Mike Pence during her father's memorial service on Friday.
"In every generation, there are those who put country first, who prize service ahead of self, who summon idealism from a cynical age".
Ryan added that, "We have this lovely thing, the chance to do for this man what he did for us, to stand up, to stand up and embrace the cause of his life".
Colin Kaepernick fronts Nike 30th anniversary campaign
The start 2018 National Football League season is only days away with veteran quarterback Colin Kaepernick still without a job. Kaepernick sat or kneeled during the anthem throughout the 2016 season and launched a movement of athletes doing the same.
Others who spoke at the service in Washington, D.C. included Senate Majority Leader Mitch McConnell (R-Ky.) and House Speaker Paul Ryan (R-Wis). Vice President Mike Pence is set to speak during the ceremony.
John McCain will be given a formal funeral service on Saturday at Washington National Cathedral, where both Obama and his predecessor as USA president, George W. Bush, are scheduled to make speeches.
At that point during his remarks, Meghan McCain's eyes appeared to snap on Pence, in a move some users identified as "side-eye".
The ceremony was just the latest in a week's worth of them for the statesman, former prisoner of war and two-time presidential candidate. McCain, who died August 25 at age 81, was a senator for 31 years, a naval aviator, and was a prisoner of war during the Vietnam War.
He spoke of the time he traveled with McCain to Iraq to visit U.S. troops, when, after an 18-hour day, he found himself "literally falling asleep in the middle of a dinner with Iraqi officials".
Watch a livestream from the U.S. Capitol.