An election for Mayor of New York City was held on November 7, 2017. Incumbent Democratic Mayor Bill de Blasio won re-election to a second term with 66.2% of the vote against Republican Nicole Malliotakis.
Bill de Blasio was elected mayor of New York City in 2013, with his term beginning January 1, 2014. De Blasio declared his intention to seek reelection in April 2015.
The following candidates filed petitions to have their names on the ballot during the primary elections: Democrats Bill De Blasio, Sal Albanese, Robert Gangi, Richard Bashner and Michael Tolkin, and Republicans Nicole Malliotakis, Rocky De La Fuente and Walter Iwachiw.
On May 9, 2017, the Libertarian Party nominated Aaron Commey. It was Commey's first run for political office. On August 1, 2017, the City Board of Elections determined in a hearing that Rocky De La Fuente had not received enough petition signatures to qualify for the Republican primary ballot. With De La Fuente's disqualification and the remaining Republican candidate, Walter Iwachiw, not reporting any fundraising for this election, Nicole Malliotakis was the only remaining candidate for the Republican nomination.
There were two Democratic primary debates, on August 23 and September 6. The candidates were incumbent mayor Bill De Blasio and former City Council member Sal Albanese. De Blasio won the primary.
The first general election debate was held on October 10, with De Blasio, Republican challenger Nicole Malliotakis, and independent candidate Bo Dietl. The second was held on November 1.
Besides the Democratic and Republican parties, the Conservative, Green, Working Families, Independence, Reform, and Women's Equality parties are qualified New York parties, with automatic ballot access.
Paul Massey ran as an independent but suddenly withdrew.
Albanese was nominated by the Reform Party Committee. On September 12, 2017, an Opportunity to Ballot was held to determine whether Albanese would retain the party's nomination. Dietl and Malliotakis each attempted to the secure the party line. Albanese won the race with approximately 57% of the vote, defeating the write-in campaigns.
A total of 5,343 write-in votes were also certified by the Board of Elections. These included 982 votes for former mayors Michael Bloomberg, 12 for Rudy Giuliani, 9 for Fiorello La Guardia (deceased), 10 for Robbie Gosine, 3 for David Dinkins, and one each for John Lindsay, Abraham Beame, and Ed Koch (the latter three deceased), and 857 that could not be attributed to anybody or counted. The only other people to receive more than 100 write-in votes were former Sen. Hillary Clinton (240) and Christine Quinn, the former Speaker of the New York City Council (195).
Manhattan was the only borough where de Blasio improved upon his 2013 margins.