Meaning "execute in the electric chair" is U.S. slang from 1929. To go out of the frying pan into the fire is first attested in Thomas More (1532). The related noun is from 1630s. Related: Fried; frying. Frying pan recorded from mid-14c.

fry

n.

"young fish," late 13c., from Anglo-French frei, from Old French frai "spawn," from froier "to rub, spawn (by rubbing abdomen on sand)." First applied to human offspring 14c. in Scottish, though OED and some other sources trace this usage to Old Norse frjo, fræ "seed, offspring."

fry

verb

To be executed in the electric chair, or to execute someone in the electric chair: I built up a case against Sandmark. You probably could have fried him with it, too/ Apparently everybody in Texas thinks everybody should be fried(1929+)

To punish severely; kick ass, rough up: I'll call the CFTC, the FBI, George Bush, and I'll beg them to fry your ass(1920+)