From the HIMYM Wiki:
Not much is known about Barney's career.
However, it is known that he works for the AltruCell Corporation, then later Goliath National Bank after AltruCell acquires GNB in a hostile takeover (Episode 4x02: The Best Burger in New York)
It is assumed that he is a high ranking member in the company.
He has said that he knows so much about the company's dirty secrets, he won't ever be fired, (Episode 4x20: Mosbius Designs), although he was almost fired in the start of 2010 because he was blamed for the failure of a big merging. (Episode 5x14: Perfect Week)
He was head of GNB's search committee in 2008 to design the new GNB headquarters (Episodes 4x08: Woooo!, 4x18: Old King Clancy, 6x03 Unfinished)
His job also entails firing potentially hostile employees (Episode 4x18: Old King Clancy)
It's hinted that his job may include illegal activities (Episode 3x14: The Bracket)
[Click the link for a few more details]
In the episode Unpause (9x15)
- Barney's job is revealed as PLEASE (Provide Legal Exculpation And Sign Everything)
which means that the company he was working for set him up as a fall guy, as
the task legally implicated Barney in all corporate mishaps and schemes.
(But Barney was well aware of that and it was part of his long term plan to get revenge on the boss of the company, who was the reason why his first girlfriend Shannon left him)