A former City Council analyst socked the legislative body and Speaker Melissa Mark-Viverito with a whistleblower lawsuit Wednesday alleging his free-speech rights were violated because he was fired over accusing Police Commissioner Bill Bratton of fudging numbers about how often cops use excessive force.

Artyom Matusov claims in the Manhattan federal court suit that Mark-Viverito and the council fired him in retaliation from his $53,000 legislative policy analyst post in September only days after he complained to reporters that Bratton low-balled the numbers in testimony before City Council.

He says in the suit filed by civil rights lawyer Norman Siegel that his discussions with the media were as a “concerned citizen” and not a city worker – and are protected by the First Amendment.

The suit, which Siegel told The Post he intended to file in September, seeks unspecified money damages.

A City Council spokesman said, “There is absolutely no merit to the claims. We are confident that we will prevail.”