McCain said he was "deeply honoured" to have Bush's support, while noting that both were naval aviators and that both had been shot down in combat.
George Bush, the current president, has yet to endorse any Republican candidate but has said he would help McCain if he wins the nomination.
The former president Bush's endorsement follows one from former Jeb Bush, the Florida governor who is the brother of the current president.
The only remaining challenger who could defeat McCain is Mike Huckabee, the former Arkansas governor.
Without mentioning McCain's chief rival by name, George Bush, the former president, suggested that his endorsement was not sending a signal to Huckabee to quit the race.
"I had not come here to tell any other candidate what to do," Bush said.
McCain is almost assured of winning the Republican nomination with a big lead of 905 to 205 delegates over Huckabee, according to the Associated Press.
McCain needs 1,191 delegates to secure the nomination at the party's convention in September.
But it is unlikely to be a smooth passage. McCain faces an uphill battle to win over the conservative wing of the Republican party.
He twice voted against the current president Bush's tax cuts and he pushed a campaign finance overhaul that critics said restricted their free speech rights.
He has also worked with Democrats on issues like an eventual path to citizenship for millions of illegal immigrants.