The Crown Inn, based on Hill Street, started raising money in December to get a defibrillator placed outside the pub - and they managed to hit their target in extra-quick time.
Manager of the pub, 30-year-old Declan Johnson, said: “During December we did a number of things to try and raise the money.
“People donated prizes like bottles of spirits and we auctioned off some signed Barnsley shirts.
“There was even people coming in and just donating money - we ended up raising more than £2,000 and it was such a great effort by everybody and quite overwhelming.
“I think it’s the only 24-hour accessible defibrillator in the area of around 2,000 people - it could really save lives.”