A McGrumpy US Marshal wasn’t lovin’ the wait at a Brooklyn McDonald’s — so he whipped out a loaded gun and pointed it at the terrified cashier and customers, cops said Sunday.

Drunken off-duty Deputy Marshal Charles Brown, 30, stumbled into the fast-food joint in Bay Ridge around 1:20 a.m. Saturday and quickly started a beef, according to police.

The fried lawman began yelling at cashier Joanna Diaz, 41, about the long wait for his food, police sources said.

Brown then allegedly pulled out his loaded service weapon and pointed it at Diaz before wheeling around and training his gun on terrified customers inside the 86th Street eatery.

The marshal zeroed in on a 21-year-old man behind him in line who tried to intervene on the cashier’s behalf, cops said.

As workers frantically dialed 911, Brown’s order came up, and he paid for his food and fled, sources said.

Responding cops canvassed the area and found Brown on the street. He was arrested and hit with a slew of charges, including menacing, harassment and violating firearm license regulations.

Brown, who lives with his father in a ritzy Bay Ridge co-op, did not return a message for comment. His father answered the door at the apartment but declined to talk to The Post.

Meanwhile, co-workers of the McDonald’s cashier said she had been scheduled to open the restaurant Sunday morning but was absent.

Heather Polamis, 35, who was buying food in the restaurant Sunday, said she found the incident so frightening that she may stop going to the location.

“You can’t go anywhere today without something happening,” the shocked receptionist said.

Another patron, Margaret Johnson, said she suspected that the munchie-motivated man simply “snapped.”

“[U.S. Marshals] are under a lot of pressure,” the 74-year-old said. “They’re under a lot of stress. They risk their lives every day.”

Brown was arraigned in Brooklyn Criminal Court, where a judge issued an order of protection on behalf of the McDonald’s and Diaz. Brown was released without bail.

Additional reporting by Tina Moore