Green’s Dictionary of Slang

lily law n.

also lilly, lilly law, lily, lily lunchbox, Miss Lily
[female proper name Lily + lily n.]

(orig. US gay) the police.

[US]‘Swasarnt Nerf’ et al. Gay Girl’s Guide 12: lily: MBS [Male Bobby-Soxer] term for policeman. often lily law (espcially in plural).
[US]J. Kirkwood There Must Be a Pony! 243: ‘Don’t you want the chicken?’ ‘Not with Lilly Law lookin’ on!’ she said, indicating the cops.
[UK]R. Hauser Homosexual Society Appendix 3, 167: Lilly, the law.
[US]B. Rodgers Queens’ Vernacular 125: Lilly (Law) the police [...] Miss Lily.
[UK](con. 1927–30) E. Williams Emlyn 27: Then there’s my antique dealer friend, likes chickens and since anything underage is dangereux I warned him to prendre garde a Lily Law.
[US]Maledicta IV:2 (Winter) 230: Lillie Langtry (1852–1929) [...] gave us the name Lily meaning both prostitute and policeman (Lily Law).
[Aus]G. Seal Lingo 116: lily is the police.
[SA]K. Cage Gayle 80/1: Lily n. policeman (abbr.) of Lily Law and her silver bangles.
[NZ](con. 1960s) W. Ings ‘Trolling the Beat to Working the Soob’ in Int’l Jrnl Lexicog. 23:1 72: In the early 1960s in New Zealand Vivian Vice, Nelly-law, Dolly Handbag, Alice, Dora-D, Hilda-Handcuff, Lily-lunchbox, Jennifer-Justice, Hilda Box-rot, Petunia Pig, Tilly Tight-twat, and Cherie Cunstable, were familiar.
[UK]P. Baker Fabulosa 294/1: Lily (Law), lilly the police.

In compounds