The other two answers cite this webpage, which claims to be telling a story from the Srimad Bhagavatam, but you can read the Srimad Bhagavatam here; I don't see any such story. As far as I'm aware, the only place in Hindu scripture where the story of Dambhodbhava is told is in the Udyoga Parva of the Mahabharata, and it doesn't mention anything about Dambhodbhava reincarnating as Karna.
When Krishna went as an envoy of the Pandavas to the Kauravas' palace, the Kauravas remained silent after Krishna made his offer of peace. So Vishnu's other incarnation Parashurama, who happened to be in palace at the time, admonished them by recounting the story of Dambhodbhava:
There was a king of yore named Dambhodbhava, who was the Head of the earth. It hath been heard by us that his sovereignty extended over the whole world. And that mighty car-warrior, rising every morning after the night had passed away, called the Brahmanas and the Kshatriyas unto himself and asked them, saying, "Be he a Sudra, a Vaisya, a Kshatriya, or a Brahmana, is there any one who is superior or even equal to me in battle?" ... And some high-souled Brahmanas then ... told him, "There are two persons who are foremost of all men and who are always victorious in battle. Thou, O king, wilt by no means be equal to them if thou seekest an encounter with any one of them." ... And the two Rishis received the king hospitably, with fruits and roots, and a seat and water.... [T]he king said unto them the same words that he was in the habit of saying unto all. And he said, "The whole earth has been conquered by the might of my arms. All my foes have been slain. Desiring a battle with you both I have come to this mountain. Offer me this hospitality. I have been cherishing this wish from a long time." Thus addressed, Nara and Narayana said, "O best of kings, wrath and covetousness have no place in this retreat. How can a battle, therefore, be possible here? There are no weapons here, and nothing of unrighteousness and malice. Seek battle elsewhere. There are many Kshatriyas on earth."
Although thus addressed, the king still pressed them for giving him battle. The Rishis, however, continually soothed him and overlooked his importunity. King Dambhodbhava, still desirous of battle, repeatedly summoned those Rishis to fight. Nara, then, O Bharata, taking up a handful of grass-blades, said, "Desirous of battle as thou art, come, O Kshatriya, and fight! Take up all thy arms, and array thy troops. I will curb thy eagerness for battle hereafter!" ... Dambhodbhava with all his troops, desirous of slaying that ascetic, covered all sides with a shower of arrows. That ascetic, however, by means of those blades of grass, baffled all those terrible shafts of the king that were capable of mangling the bodies of hostile warriors. The invincible Rishi then let off towards the king his own terrible weapon made of grass-blades and which was incapable of being counteracted. And highly wonderful was that which happened, for that ascetic, incapable of missing his aim, pierced and cut off, by those grass-blades alone, the eyes and ears and noses of the hostile warriors, aided also by his power of illusion.
And beholding the entire welkin whitened by those grass-blades, the king fell at the feet of the Rishi and said, 'Let me be blessed!" Ever inclined to grant protection unto those that sought it, Nara then, O king, said unto that monarch, "Be obedient to the Brahmanas and be virtuous. Never do so again.... Blessed be thou, and with our leave, go hence, and never again behave in this way. At our command, enquire thou always of the Brahmanas as to what is for thy good!" The king then, worshipping the feet of those two illustrious Rishis, returned to his city, and from that time began to practise righteousness. Great indeed, was that feat achieved of old by Nara. Narayana, again, became superior to Nara in consequence of many more qualities. They that were Nara and Narayana in days of yore are now Arjuna and Kesava.
(Reminds you a bit of Snow White, doesn't it?). As you can see, there's no mention of Dambhodhbhava reincarnating as anyone, only about Nara and Narayana reincarnating as Arjuna and Krishna. And the story ends with Dambodhbhava actually being blessed by Nara and Narayana, not cursed as the webpage says. So the webpage's claim seems to be erroneous.
In any case, the Adi Parva of the Mahabharata describes who the different characters were incarnations of, and this is what it says about Karna:
Karna--the first of all exalted men--the foremost of all wielders of weapons--the slayer of foes--and the best portion of [Surya] the maker of day--was the friend and counsellor of Duryodhana
So Karna was an incarnation of Surya, just as Arjuna was an incarnation of Indra. Now recall that in the Ramayana, Sugriva was an incarnation of Surya and Vali was an incarnation of Indra. So it's often said (although it may not have a basis in scripture) that Arjuna killed Karna in an underhanded way to get even with Karna's previous birth Sugriva being involved in the underhanded killing of Arjuna's previous birth Vali.