Joly took 58 percent of the vote in a party primary, far ahead of the 41 percent of votes cast for Nicolas Hulot, a television presenter and the best-known face of the environmental movement in France.
The 67-year-old will now line up as her Green-Europe Ecology party's candidate against right-wing President Nicolas Sarkozy if, as expected, he stands again in the 2012 election.
Joly promised after her victory in the party's primary vote was announced that she would be the candidate of "the France that does not accept discrimination or ghettos, of those who believe that fraternity is our most precious good."
Joly was a dynamic examining magistrate whose probes into the Elf oil company's affairs in the 1990s Africa was an inspiration for Claude Chabrol's film "L'Ivresse du pouvoir" (Comedy of Power).
Born Gro Eva Farseth in Norway, she came to France to work as an au pair at the age of 17 and later studied law in her adopted country.