This is answered in book 3, Brisingr, in chapter 48. SPOILERS FOLLOW!
Eragon asks:
"The two times we have fought Murtagh and Thorn, Murtagh has been more powerful than any human ought to be. On the Burning Plains, he defeated Saphira and me because we did not realize how strong he was. If not for his change of heart, we would be prisoners in Uru'baen right now. You once mentioned that you know how Galbatorix has become so powerful. Will you tell us now, Master? For our own safety, we need to know."
Glaedr explains the concept of the Eldunari:
The gold dragon turned his head on his paws to better look at Eragon, his scales scraping against one another. Unlike with most creatures, he said, a dragon's consciousness does not reside solely within our skulls. There is in our chests a hard, gemlike object, similar in composition to our scales, called the Eldunari, which means "the heart of hearts." When a dragon hatches, their Eldunari is clear and lusterless. Usually it remains so all through a dragon's life and dissolves along with the dragon's corpse when they die. However, if we wish, we can transfer our consciousness into the Eldunari. Then it will acquire the same color as our scales and begin to glow like a coal. If a dragon has done this, the Eldunari will outlast the decay of their flesh, and a dragon's essence may live on indefinitely. Also, a dragon can disgorge their Eldunari while they are still alive. By this means, a dragon's body and a dragon's consciousness can exist separately and yet still be linked, which can be most useful in certain circumstances. But to do this exposes us to great danger, for whosoever holds our Eldunari holds our very soul in their hands. With it, they could force us to do their bidding, no matter how vile.
Oromis related what Galbatorix did with them:
"So then," said Eragon, "Galbatorix captured the Eldunari?"
Contrary to Eragon's expectations, it was Oromis who replied. "He did, but not all at once. It had been so long since anyone had truly threatened the Riders, many of our order had become careless about protecting the Eldunari. At the time Galbatorix turned against us, it was not uncommon for a Rider's dragon to disgorge their Eldunari merely for the sake of convenience." [...]
Oromis resumed speaking: "When Galbatorix killed his first Rider, he also stole the heart of the Rider's dragon. During the years Galbatorix spent hiding in the wilderness thereafter, he broke the dragon's mind and bent it to his will, likely with the help of Durza. And when Galbatorix began his insurrection in earnest, with Morzan by his side, he was already stronger than most every other Rider. His strength was not merely magical but mental, for the force of the Eldunari's consciousness augmented his own.
"Galbatorix did not just try to kill the Riders and dragons. He made it his goal to acquire as many of the Eldunari as he could, either by seizing them from Riders or by torturing a Rider until his dragon disgorged its heart of hearts. By the time we realized what Galbatorix was doing, he was already too powerful to stop. It helped Galbatorix that many Riders traveled not only with the Eldunari of their own dragon but also with Eldunari of dragons whose bodies were no more, for such dragons often became bored with sitting in an alcove and yearned for adventure. And of course, once Galbatorix and the Forsworn sacked the city of Doru Araeba on the island of Vroengard, he gained possession of the entire hoard of Eldunari stored therein.
"Galbatorix engineered his success by using the might and wisdom of the dragons against all of Alagaesia. At first he was unable to control more than a handful of the Eldunari he had captured. It is no easy thing to force a dragon to submit to you, no matter how powerful you might be. As soon as Galbatorix crushed the Riders and had installed himself as king in Uru'baen, he dedicated himself to subduing the rest of the hearts, one by one.
"We believe the task preoccupied him for the main part of the next forty years, during which time he paid little attention to the affairs of Alagaesia-which is why the people of Surda were able to secede from the Empire. When he finished, Galbatorix emerged from seclusion and began to reassert his control over the Empire and the lands beyond. For some reason, after two and a half years of additional slaughter and sorrow, he withdrew to Uru'baen again, and there he has dwelt ever since, not so solitary as before, but obviously focused upon some project known only to him. His vices are many, but he has not abandoned himself to debauchery; that much the Varden's spies have determined. More than that, though, we have not been able to discover."
And specifically with regard to Eragon's fight with Murtagh:
Thinking back to when he and Saphira had battled Murtagh and Thorn, Eragon said, "Galbatorix must have given Murtagh several Eldunari. That's the only explanation for his increase in strength."
Oromis nodded. "You are fortunate Galbatorix did not lend him any more hearts, else it would have been easy for Murtagh to overwhelm you, Arya, and all the other spellcasters with the Varden."
Eragon remembered how, both times he and Saphira had encountered Murtagh and Thorn, Murtagh's mind had felt as if it contained multiple beings. Eragon shared his recollection with Saphira and said, Those must have been the Eldunari I sensed. . . . I wonder where Murtagh put them? Thorn carried no saddlebags, and I didn't see any odd bulges in Murtagh's clothing.
I don't know, said Saphira. You do realize that Murtagh must have been referring to his Eldunari when he said that instead of tearing out your own heart, it would be better to tear out his hearts. Hearts, not heart.