Mr Miguna has boarded a flight to take him to Canada, where he is a citizen.
The government says Mr Miguna has renounced his Kenyan nationality, which he denies.
TV stations were stopped to prevent them broadcasting the ceremony, which officials said was an act of treason.
Mr Odinga boycotted last year's election re-run, saying it would be rigged in favour of President Uhuru Kenyatta.
After Mr Odinga's unofficial swearing in on 30 January, Mr Miguna declared that he was "the one who signed the oath and conducted it" and goaded police to come and arrest him.
On 2 February, police broke down his door in a dawn raid and detained him.
Mr Miguna says he was then kept "in unlawful incommunicado detention for five days under the most horrendous, cruel and inhumane conditions imaginable".
On Tuesday, he appeared before a court outside Nairobi and was charged with "being present and consenting to the administration of an oath to commit a capital offence, namely treason".
The court had ordered that Mr Miguna be bailed following his hearing, but this did not happen.
Videos posted on social media then showed Mr Miguna on board a flight to Amsterdam, from where he was due to connect to Canada.
More about: Kenya