Two episodes give different reasons for his alcoholism.
After being forced to spend a sober night at Moe's Tavern serving as designated driver, Barney left town in Homer Simpson's car to, among other things, give a guest lecture at Villanova (although, by his own admission, the guest lecture could just have likely occurred on a street corner).