Libratus, an artificial intelligence program developed at Carnegie Mellon University, was trained to play a variant of the game known as no-limit heads-up Texas hold 'em.
In a similar tournament in 2015, the humans won.
The victory has been hailed as a significant milestone for AI, by the team responsible for building it.
The AI won more than $1.5m (£1.2m) worth of chips from the humans.
The matches - held at Rivers Casino in Pittsburgh - were live-streamed over gaming site Twitch.
Tuomas Sandholm, professor of computer science at Carnegie Mellon, said the event was "historic".
"Heads-up no limit Texas hold 'em is in a way the last frontier of all the games," he said.
"Othello, Chess, Go, Jeopardy have all been conquered, but this remained elusive: this is a landmark in AI game-play."
Prof Sandholm said that the algorithm could be transferred to a range of other uses.
"This is not just about poker," he said.
"The algorithms can take information and output a strategy in a range of scenarios, including negotiations, finance, medical treatment and cybersecurity."
"Now we have proven the ability of AI to do strategy and reasoning, there are many potential applications in future."
One of the professional poker players, Jimmy Chou, admitted at the halfway point that the AI was proving a tough opponent.
"The bot gets better and better every day. It's like a tougher version of us," he said.
"The first couple of days, we had high hopes," Mr Chou said.
"But every time we find a weakness, it learns from us and the weakness disappears the next day."
He added that the professionals had been sharing notes and tips in an effort to find weaknesses in the AI's game-play.
But they were not the only ones doing homework.
Each night after the play ended, the Pittsburgh Supercomputing Centre added computations to sharpen the AI's strategy.
All four human players shared the $200,000 (£159,000) prize fund, ranked in order of how well they played against the AI.
Jason Les, who came fourth, summed up the feelings of all four players when he said the match had been "incredibly challenging".
"I was impressed with the quality of poker Libratus played," he said.
"We tried everything we could, but it was just too strong. It became very demoralising."