A Federal High Court in Abuja has discharged an interim forfeiture order on the Oil Prospecting Licence (OPL) 245.
Justice John Tsoho, who delivered the ruling, also refused an application filed by Malabu Oil and Gas to join in the case.
The EFCC asked the court to temporarily return the oil well to the government while it continued its investigation, which the court granted.
Both companies approached the court with an application, challenging the ruling.
Shell Nigeria Exploration and Production Company (SNEPCO) said it welcomed the judgment. He said that as a result, the ownership of the OPL should be returned to Shell and Agip.
The Nigerian court case is the latest of several inquiries, following those by Dutch and Italian authorities, into the purchase of OPL 245, which could hold up to 9.23 billion barrels of oil, according to industry figures.
The rights to the oil block were originally awarded to Malabu, in controversial circumstances, by former petroleum minister, Dan Etete.
In the deal finally consummated in 2011, only $210 million of the $1.3 billion paid by Shell and Eni for the block went into federal government coffers as "signature bonus".
Shell later chose to resolve the matter with Malabu in 2010, when former President Goodluck Jonathan assumed office.