Caught and secured in jail. (See Clou.)
I nailed him
(or it.) I hooked him, I pinned him, meaning I secured him.
Isaiah (xxii. 23) says, “I will fasten him as a nail in a sure place.” However, the idea may still be, I secured him by making him pay down
the earnest on The Nail. (See Pay on the Nail, second
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894
More on Nailed from Infoplease: