"Opportunity has driven farther than any other wheeled vehicle on another world," said Mars Exploration Rover Project Manager John Callas, of NASA's Jet Propulsion Laboratory (JPL) in Pasadena, California.
The previous record was held by the Soviet Union's Lunokhod 2 rover, NASA said.
A drive of 48 meters on July 27 put Opportunity's total odometry at 40.25 kilometres, it said.
The space agency, however said that Opportunity was never designed for distance and was intended to drive about one kilometre.
Also Read
The rover had driven more than 32 kilometres before arriving at Endeavour Crater in 2011, where it has examined outcrops on the crater's rim containing clay and sulfate-bearing minerals.
The sites are yielding evidence of ancient environments with less acidic water than those examined at Opportunity's landing site, the space agency said.
According to NASA, if the rover can continue to operate the distance of a marathon -- about 42.2 kilometres -- it will approach the next major investigation site mission scientists have dubbed "Marathon Valley."
The Russian Lunokhod 2 rover, a successor to the first Lunokhod mission in 1970, landed on Earth's moon on January 15, 1973, where it drove about 39 kilometres in less than five months, according to calculations recently made using images from NASA's Lunar Reconnaissance Orbiter (LRO) cameras that reveal Lunokhod 2's tracks.