On June 28, Mike Duggan, a leading candidate for Mayor of Detroit before he was removed from the ballot, announced he will run as a write-in candidate. See this story. Other large cities in which write-in candidates for Mayor have been relatively successful are Washington, D.C., and San Francisco. The article mentions the Washington, D.C. example but does not mention San Francisco. In 1999 Tom Ammiano launched a write-in campaign for Mayor against incumbent Willie Brown, and finished second, so that he was permitted on the run-off ballot. Thanks to Thomas Jones for the link.