New York City Mayor Bill de Blasio attends a Fire Department of New York ceremony on Wednesday.

Kevin Hagen for The Wall Street Journal

A hockey bet between mayors is going to be settled at the mic.

Hours before the New York Rangers and Los Angeles Kings are set to battle for this year’s Stanley Cup in a best-of-seven series, Mayors Bill de Blasio of New York City and Eric Garcetti of Los Angeles made a deal in which the loser must sing on the late-night show “Jimmy Kimmel Live!” and give hot dogs to a studio audience.

Should the Rangers win the series, which begins tonight in Los Angeles, Mr. Garcetti will sing a shortened version of Frank Sinatra’s “New York, New York,” and provide hot dogs from Pink’s, a popular Hollywood hot dog stand known for its extra-long frankfurters.

If the Kings win, Mr. De Blasio will sing a rendition of composer Randy Newman’s “I Love LA,” a bouncy, satirical rock-and-roll song. Mr. de Blasio’s rendition, according to a release from his office, will not include the song’s original first few lines, “Hate New York City. It’s cold and it’s damp and all the people dress like monkeys.” Mr. de Blasio will also have to supply hot dogs from Gray’s Papaya.

Mr. Garcetti, who assumed office last July, is a trained pianist and wrote musicals while a student at Columbia University. He has performed with singer-musician Moby. A spokesman for Mr. Garcetti, Yusef Robb, said, “Frankly, it’s irrelevant whether or not our mayor can sing or play the piano given that Mayor de Blasio is the one who’d better take some singing lessons between now and games 4, 5, 6 or 7.”

Mr. Garcetti is a friend of Mr. Kimmel, who has been a Kings fan since moving to Los Angeles and doing local radio sports in 1994.

Phil Walzak, a spokesman for Mr. de Blasio, said that the mayor is happy to know Mayor Garcetti is a trained pianist. “He’ll definitely need those musical skills when he has to belt out the lyrics to Old Blue Eyes after the Blueshirts dispatch the Kings, and New York takes the Cup. Go Rangers!” said Mr. Walzak.

The mayoral bet comes a day after New York Gov. Andrew Cuomo agreed to send California Gov. Jerry Brown a wide selection of the state’s finest foods, including wine, seafood, apples, maple syrup and Italian Sausages. (New York is the country’s top producer of yogurt, but the snack was not included in Gov. Cuomo’s wager.)