Austin Okwor is reported to be part of a team investigating corruption within the judiciary. He is being treated in hospital for his wounds.
The attack happened in Port Harcourt on Saturday night, the Economic and Financial Crimes Commission said.
Last year several judges were arrested on suspicion of corruption in a nationwide sting operation.
President Muhammadu Buhari has prioritised the fight against corruption but critics say his administration has targeted only his political rivals.
Mr Okwor was surrounded by a gang who opened fire on him, Nigeria Bulletin reports.
Economic and Financial Crimes Commission spokesman Wilson Uwujaren said Mr Okwor had received threatening text messages in recent months.
"This incident underlines the hazards which operatives of the commission are daily exposed to in the discharge of their duties," Mr Uwujaren said in a statement.
In April President Buhari's office ordered an investigation after the head of the national intelligence agency was suspended over corruption allegations.
The president acted after anti-corruption officers found more than $43m (Â£34m) in a flat in the main city, Lagos.

In a nerve-stricken performance, Boreham Wood struggled to create anything at a quiet Meadow Park.
The Silkmen had the game's best chances, as Chris Holroyd tested Boreham Wood's James Russell before Kristian Dennis fired wide.
Harry White had the Wood's best chance, shooting over the bar as neither side could break the deadlock.
A leading anti-corruption investigator in Nigeria has survived being shot multiple times, officials say.
[NEXT_CONCEPT]
Boreham Wood's 0-0 draw at home to Macclesfield saw them fall into the National League relegation zone.