The 39-year-old was shown the door by the Tykes at the end of November but has made a swift return to management with the Shakers, for whom he played over 100 games.
Bury chairman Stewart Day told the club's website: "I have been a long-time admirer of David and what he achieved at Barnsley was a credit to him and to his philosophy of hard work and dedication. This is my first managerial appointment as a chairman and it needed to be the right one. Hence I would not be rushed.
"I am confident that after meeting with David and his team that we have secured the best manager available to take us to the next level and help us achieve the five-year goal. David is a dedicated individual that will not accept anything but the best for Bury Football Club.
"He had received offers from other clubs at a higher level, but he has bought into what we are trying to achieve at this club and has committed his future to take us back to where we belong, the Championship.
"Together with the board I would like to thank Ronnie Jepson for all his hard work and commitment. We wish him well for the future, but he will be leaving the club with immediate effect.
"I knew the first year would be difficult both on and off the pitch, but promise to continue to work tirelessly to deliver the five-year plan. All I can ask is that the fans come out on Saturday to give our new manager the support he deserves and start the march back up the league."
Flitcroft's first game in charge will be on Saturday, when Bury face Northampton at Gigg Lane.