Smell a rat - to suspect that something is wrong; to sense that someone has caused something wrong.
I don't think this was an accident. I smell a rat. Bob had something to do with this. The minute I came in, I smelled a rat.
There's another phrase similar to this one that goes 'this smells fishy.' Both expressions mean something feels wrong, but the person is unable to discern exactly what it might be.
For centuries, the word smell has been used in a figurative sense to define someone who, because of their intuition, perceives something to be off. For example, Shakespeae, a popular English poet, wrote: "Do you smell a fault?" in the play King Lear, which is believed to have been written between 1603 to 1606.
According to the Facts on File Encyclopedia of Word and Phrase Origins, written by Robert Hendrickson, he mentions that the origins for this idiom are uncertain, however, he explains a theory behind it might possibly involve a cat being able to smell a rat nearby, despite not having sight of it.
The idea, I assume, is that after picking up a rat's scent, a cat perceives that something is not quite right, but without having vision of the rat, the cat is unable to confirm its feelings.
Anyways, the phrase with its modern meaning was used as early as June 1851 in the County Courts Chronicle newspaper:
"Two other cases the witness mentioned, in the first of which he alleged that the judge, in reference to
an insufficiency of evidence said, 'I smell a rat; I don't believe the defendant or her witness.'"