Police investigating the attack in Lochgelly on Saturday night said two males aged 16 and 19 were being held.
A 22-year-old man was injured outside the Premier Stores on Francis Street just before 22:00.
He was being treated at Victoria Hospital where his condition is said to be stable. The suspects are expected to appear in court on Tuesday.
Two teenagers have been arrested in connection with an attempted murder outside a shop in Fife.