New York City Councilman Corey Johnson filed a complaint against the New York Police Department after he was ticketed for walking between subway cars Wednesday night, city officials said.

Mr. Johnson was moving between two cars on the E train, Mr. Johnson’ office said, as it pulled into the 23rd Street station at about 6 p.m. Wednesday. Police said Mr. Johnson was traveling on a C train; both trains run on the same track on that section of the line. He was stopped by two plainclothes NYPD officers and given a summons, New...