If a customer at Muchmore's in Brooklyn so much as busts a move, owner Andrew Muchmore could be busted.

New York City prohibits dancing in a venue unless it has a cabaret license, and Muchmore's—like lots of bars and restaurants across the five boroughs—doesn't have one.

Now, Mr. Muchmore, who is also a lawyer, is challenging the city's nearly...