The suit was filed by Scott Ard in the federal district court in San Jose, according to a report in The Mercury News, a newspaper that covers the Bay Area of California.
Ard worked for Yahoo! for 3½ years and now works for the Silicon Valley Business Journal as its editor-in-chief.
In the suit, Ard said: "Mayer encouraged and fostered the use of (an employee performance-rating system) to accommodate management's subjective biases and personal opinions, to the detriment of Yahoo’s male employees."
Marissa Mayer: more bad news.
The newspaper quoted Yahoo! spokesman Carolyn Clark as defending the firm's "fair" employment and performance review systems.
Apart from Mayer, the lawsuit also names Kathy Savitt, former chief marketing officer, and Megan Liberman, Yahoo! News editor-in-chief, who was vice-president of news at the time, as discriminating on the basis of gender.
Ard was hired in 2011 and fired in January 2015 during a phone call which was part of his performance review; the firing happened shortly after he was told by Savitt that his role as head of editorial programming for the Yahoo! home page was being given to a woman whom Liberman had hired, according to the lawsuit.
Yahoo!'s diversity reports indicate that women in leadership positions rose from 23% in 2014 to 24% in 2015, the newspaper said.