Green’s Dictionary of Slang

jack in a box n.

[DSUE claims prob. from jack in the box n.1 (1)]

1. (also jack n the box) a cheat, spec. a thief who deceives tradesmen by the substitution of identical boxes: his own filled with gold pounds, the one that the tradesman finds himself left with filled with silver shillings.

[UK]Dekker Lanthorne and Candle-Light Ch. 11: This Iacke in a Boxe, or this Diuell in Mans shape, wearing (like a Player on a Stage) good cloathes on his backe, comes to a Goldsmithes stall, to a Drapers, a Haberdashers [...] And ther drawing forth a fayre new Boxe, hammered all out of Silver Plate, hee opens it, and powres foorth twentie or forty Twentie-shilling-peeces in New-golde. To which heape of Worldly-temptation, thus much hee addes in words, that either he himselfe, or such a Gentleman (to whom he belongs) hath an occasion for foure or five daies to use fortie pound. [...] But whilst this musick is sounding, Iacke in a Boxe Acts his part in a dum shew, Thus: he shifts out of his fingers another boxe, of the same mettall and making that the former beares, which second boxe is filled onely with shillings.
[Ire]Head Eng. Rogue I 168: The Box-keeper shall walk off [...] whilst your Antagonist shall put the change upon you, or make use of his own Jack-in-the-box.
[UK]B.E. Dict. Canting Crew.
[UK]Grose Classical Dict. of the Vulgar Tongue.
[UK]Lex. Balatronicum.
[UK]C. Dibdin Yngr Larks of Logic, Tom and Jerry III i: Of all jacks in office, a jack in the box, / Or a jack for a jill, if you’d catch ’em.
[UK]Egan Grose’s Classical Dict. of the Vulgar Tongue.

2. see jack in the box n.1 (2)

3. see jack in the box n.1 (3)