An ex-con was busted Thursday for allegedly plotting the assassination of a reputed mobster who was rubbed out while waiting for a cup of McDonald’s coffee last week, The Post has learned.

Bushawn “Shelz” Shelton, 34, is named in a Brooklyn federal court complaint that charges him with conspiring to murder two men, one of whom was gunned down inside his car “in a drive-through lane of a fast food restaurant in the Bronx” on Oct. 4.

Law-enforcement sources identified the victim — who court papers call “John Doe #1” — as reputed Bonnano crime family associate Sylvester Zottola, 71.

Zottola had ordered a medium coffee and was boxed in by other cars when he was shot in the head, chest and shoulder at the McDonald’s restaurant at Webster Avenue and Belmont Street around 4:45 p.m.

Authorities suspect the hit was ordered by Albanian gangsters looking to take over an illegal gambling racket involving “Joker Poker” video games that Zottola ran, sources said.

The second target, “John Doe #2,” was identified by sources as Zottola’s son, Salvatore Zottola, 41, who in July was shot and wounded outside the family’s compound of homes in the Locust Point section of The Bronx.

According to court papers, the younger Zottola was targeted in a bid “to lure out” his dad so he could be killed.

Both men were repeatedly robbed, assaulted and threatened with guns in the months leading to the two shootings, court papers say.

The case against Shelton is based on claims from an unidentified cooperating witness who says Shelton paid him to serve as the hitman, and who has pleaded guilty to crimes including murder-for-hire conspiracy, court papers say.

The cooperator’s account “has been corroborated by physical evidence, telephone records, cell-site records, video surveillance and other evidence,” according to the feds.

Shelton was paroled in 2012 after serving a three-year prison term for criminal possession of a weapon in Queens after cops found a .38-caliber handgun in a hidden compartment of his Lincoln Navigator SUV.

In a bizarre twist, sources said his record also includes a plea bargain to harassment stemming from a gang assault on a man and his pregnant girlfriend inside the same McDonald’s restaurant where Zottola was killed.

The victims were attacked when Shelton and several friends thought the man gave them a funny look, after which he was beaten to a pulp and his girlfriend was also punched, sources said.