The Cavaliers' Freeman McPhearson led all scorers with 22 points.
King William led by two, 11-9, at the end of the first quarter, but Lancaster answered with a 10-8 run in the second to knot the game at 19-19 at the half.
The Cavs again led by two at the end of three and then went up by three with five seconds remaining.
"I called timeout to set up a play, a box, to get two picks and get two opportunities to shoot but then didn't get a look," said LHS coach Tim Rice.
The Devils were playing a starter down with Ricky Gibson out sick.
"King William is a good team. I'm not going to take that away from them, but with Ricky there it might have been different," said Rice.
Tyler Colding led the Devils with 18 points. Jovonte Smith and Trevon Taylor scored eight each.
Lancaster picked up a 73-55 win over Middlesex December 18 to end non-district play at 9-1 overall.
Gibson led three double-digit scorers for Lancaster with 23 points. Colding added 18 and Taylor scored 10.
After taking a five-point lead in the first quarter, the Devils outran the visiting Chargers, 24-10, in the second quarter for a 19-point lead at the half.
Lancaster will open Northern Neck District play on Wednesday, January 9, at Washington & Lee.
In JV games, Darrien Doggett scored 11 points and had four steals December 18 to lead Lancaster over Middlesex, 48-36.
Lancaster's JV team improved to 10-0.
Tyrell Henderson contributed eight points, had eight rebounds, five assists and five steals.
Lancaster defeated King William, 46-31, on December 17 with Henderson scoring 23 points and pulling down eight boards to lead the Devils. Eleven of his points came in a decisive third quarter to help give Lancaster the lead. Henderson also had six steals.