LAGOS, Nigeria — Even in a country where untold oil wealth disappears into the pockets of the elite, the oil corruption scheme he was investigating seemed outsize — and he threatened to lay it bare at a meeting with Nigeria’s top bankers.

The rabble-rouser was none other than the governor of the country’s central bank. Weeks later, however, he was out, fired by Nigeria’s president in an episode that has shaken the Nigerian economy, filled newspapers and airwaves here, and even inspired a rare street demonstration.

The bankers were going to have to open their books, the governor, Lamido Sanusi, warned them at the recent meeting. He wanted to see where the money was going — $20 billion from oil sales that, mysteriously, was not making its way to the treasury, in a country that could soon be declared Africa’s biggest economy and already attracts the most direct foreign investment on the continent, according to the United Nations.

But his suspicions were cutting too close, Mr. Sanusi said — too close to an oil-politics nexus that both feeds the political establishment in Nigeria, in his view and that of analysts, and deprives the country of vital revenue.