Mr Odinga, who was defeated by incumbent Uhuru Kenyatta, has accused the electoral authorities of fraud tantamount to "democracy's slaughter".
But foreign observers described the election as free and fair.
The international community has urged calm amid fears that the fraud claims could result in violence.
The official results gave President Kenyatta about 54% of the vote, and Mr Odinga 45%.
Mr Odinga, who had previously refused a court appeal against the outcome, said the opposition had collected concrete evidence of massive irregularities that were allegedly used to rig the vote.
"We have now decided to move to the Supreme Court to lay before the world the making of a computer-generated leadership," he told journalists.
European Union foreign affairs chief Federica Mogherini and former UN Secretary General Kofi Annan were among those who had urged Mr Odinga to seek redress through the courts. But he insisted that his decision did not mean he was giving up the fight.
"By going to court we aren't legitimising misplaced calls from some observers for us to concede but are seeking to give to those who braved the long lines in the morning chill and hot afternoon... a chance to be heard."
He also repeated his call for peaceful protests, saying Kenyans had the constitutional rights to demonstrate, strike and carry out acts of civil disobedience.
But on Monday, Mr Odinga's strike request was largely ignored.
"This is just the beginning, we will not accept and move on," he added.
In 2013, Mr Odinga challenged the presidential results in the Supreme Court and lost. Now, he said, he the court had an opportunity to demonstrate its independence.
"Our decision to go to court constitutes a second chance for the Supreme Court. The court can use this chance to redeem itself or, like in 2013, it can compound the problems we face as a country."

The "learning from mistakes league" rates 120 trusts outstanding or good, 78 with "significant concerns" and 32 with a "poor reporting culture".
Other measures include legal protection for staff who admit mistakes, and new medical examiners to review deaths.
A patient safety charity welcomed the moves but said it remained "concerned".
The first annual "learning from mistakes league" uses feedback from staff on their freedom to speak when things go wrong.
Health Secretary Jeremy Hunt, who is hosting a "global patient safety summit" in London on Wednesday and Thursday, said the changes were a step towards a "new era of openness".
He said health services must "unshackle ourselves from a quick-fix blame culture and acknowledge that sometimes bad mistakes can be made by good people".
The changes announced by Mr Hunt include:
Peter Walsh, chief executive of patient safety charity Action Against Medical Accidents, welcomed the initiatives but said he remained concerned about the "woeful inconsistency and often inadequate quality of NHS investigations into serious incidents".
He said there was "nothing" in Mr Hunt's announcement to reassure his organisation that urgent action would be taken to address the quality of local investigations.
James Titcombe, whose son Joshua died after failings in care, said the measures were "major steps that will help move the NHS towards the kind of true learning culture that other high-risk industries take for granted".
Labour's shadow health secretary Heidi Alexander said her party supported "any measures that will improve safety", but she added: "On Jeremy Hunt's watch, hospitals are overcrowded, understaffed and facing financial crisis."

It was poured onto the front archway of the hall in Clifton Street on the night of Sunday 26 August.
In July, the hall was damaged in another paint attack. Police have appealed for information.
They have asked witnesses to contact them or to provide details on the Crimestoppers line.
Kenya's opposition leader Raila Odinga says he will mount a legal challenge to the result of last week's presidential election, which he claims was rigged.
[NEXT_CONCEPT]
Health trusts in England have been ranked by their ability to learn from mistakes, as part of several changes designed to improve patient safety.
[NEXT_CONCEPT]
Paint has been thrown over an Orange hall in north Belfast.