Krystian Pearce headed the Bees into the lead from a corner before Andrew Yiadom scored with a deflected shot.
John Oster then drove in from 20 yards and Anthony Edgar wrapped up the win with a stoppage-time shot.
Davids, 39, last played for Crystal Palace in a 3-0 defeat by Swansea on 30 October 2010.
Despite the win, Barnet remain bottom of the Football League.
VIEWS FROM THE DRESSING ROOM
Northampton Town manager Aidy Boothroyd told BBC Radio Northampton:
"We made a team at the bottom look like superstars, and they're not.
"We've got a lot of young players, we've lost our third right-back (to injury), but we're coming here to win - not get beat 4-0. It's not acceptable.
"We were suicidal. We made some ridiculous decisions in possession.
"There was fantastic support again and what I can promise is we will be back, working hard to make sure that we continue the progress we've made. I went over and clapped the fans, because it isn't their fault we were rubbish tonight."
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.