The Stone County Sheriff's Office said a man listed a catalytic converter on Facebook Marketplace on Tuesday.
The online ad included a photo of the box, but in the background, a "large bag of meth and syringe" were clearly visible on the coffee table.
A citizen who spotted the drugs sent a tip to the sheriff's office, who showed up the next day at the man's door.
"Today we arrived at this gentleman's house with a search warrant. You can imagine his surprise!" the sheriff wrote.
When investigators went into the house, they said the man "still had 48 grams of meth and a pistol that he is forbidden to own."
The sheriff's office identified the man as 38-year-old James Kertz, a convicted felon, to KYTV.
According to the station, Kertz told deputies he was unaware the drugs were in the photo when he posted the online ad.
"Take note, if you are selling items on social media, make sure your drugs are not in the background," the sheriff's office said.
They added that Kertz's catalytic converters are not for sale right now.