The story with the six babies who got killed by Kamsa is originally found in the Harivamsa. There it is known as the SaDgarbha ("the six embryos") episode. For an excellent translation and analysis of the story see:
SUNESON, Carl: The Sadgarbha tradition in the Harivamsa, the Puranas and the Krsnacaritranataka of Ranajit Malla. Wiener Zeitschrift für die Kunde Südasiens und Archiv für indische Philosophie 36 (1993) 197-211[= Supplement Proceedings of the VIIIth World Sanskrit Conference Vienna 1990]
Introductory remarks. - The Harivamsa and Nilakantha's commentary. - The Puranic tradition. - The Jaina alternative. - The eastern tradition and Ranajit Malla's Krsnacaritranataka.
A pious Madhvaite explanation of the matter I found here (the passage is quoted in blue below)
:The Background for Kamsa killing the children
[Mahabaratha Tatparya Nirnaya - Introduction by Prof.K.T.Pandurangi Chapter XII]For the episode of Kamsa killing six children of Devaki, there is an interesting
background. They were six sons of Marichi. They laughed at Sage Devala, as he was very
ricketee.He cursed them.They were born as the sons of Kalanemi. They became known as
Sadgarbha They used to remain in the water at Patala loka performing penance to
obtain immortality. Brahma granted them immortality. However Hiranyakashipu became
angry at this. He did not like his brother's grandsons obtaining a boon from
Brahma (Kalanemi was the son of Hiranyakashipu's brother Hiranyaksha).
Therefore, he cursed them to be born again and be killed by their own father.
Accordingly, they were born as Devaki's children and were killed by their own
father. Kamsa as Kalanemi was their father in their earlier birth. The boon
given by Brahma to be immortal and the curse given by Hiranyakashipu to be
killed by their father were reconciled by Durga.
Durga used to keep each one of these in a cave and make them sleep for one full year.
She used to take the jiva of each one and put it in the embryo of Devaki, thus acquiring a
new body. It used to be killed by Kamsa. Durga used to take back this jiva and put it in
the sleeping body again. Thus, they were killed by their father Kamsa i.e. Kalanemi and
were also immortal. Durga performed this trick as per the direction of God.
Apart from the Harivamsa the story is also mentioned in the Devibhagavata:
7. Thus the six sons were born to Devakî; and Kamsa, too, killed those six sons consecutively as they were born. These six sons named Sadgarbha, were killed just after their births, owing to their having been previously cursed.
8. O King! Hear why they were cursed before. In the reign of Svâyambhuva Manu, were born to Urnâ; the wife of Maharsi Marîchi, the six powerful sons, all of a virtuous disposition.
9-11. Once, on an occasion, the Prajâpati Brahmâ, on seeing his daughter, became passionate, and was ready to hold sexual intercourse with her. At this, those six sons laughed at him. Brahmâ cursed them saying You all go quickly and take your birth in the wombs of the asuras. Therefore those six sons became the sons of Kâlanemi in their first birth. At their second birth, they became the sons of Hiranyakasipu. This second time they had the fear of curse in their minds and therefore were born endowed with knowledge.
12. In this birth they became peaceful and, collecting all their energies, they began to practise austerities. Brahmâ was pleased at this and asked the Sadgarbha to take boons.
13. Brahmâ said :-- O my sons! I was very angry to you before and cursed you; now I am very much pleased with you; ask boons from me that you all desire.
14-15. Vyâsa said :-- Hearing Brahmâs words, they were very glad and becoming very anxious to secure their objects of desire, said :-- O our grand
sire! Today thou art pleased unto us; now favour us with our desired boons. That we may be invulnerable to all the Devas, human beings, the big serpents the Gandarbhas, and the Lord of Siddhas, (semi-divine beings supposed to be of great purity and holiness and said to be particularly characterised by eight supernatural faculties called Siddhis).
16. Vyâsa said :-- Brahmâ told them What you have asked, you would certainly get; O blessed ones! better go now; my words will be found to be literally true. No doubt in this.
17-19. Granting them boons, Brahmâ went away; they then became very glad. O best of Kurus! Hiranyakasipu began to think My sons now have pleased the Grandsire Brahmâ and are now regardless of me and got very angry and said :-- You all are become very proud on account of receiving boons; and since you have ceased your good feelings towards me I also henceforth cut off my connection with you. Now better go to Pâtâla; you will be known in this world as Sadgarbha.
20-21. At present you would be always involved in deep sleep and remain in Pâtâla for many years; and when you will be born one after another in the womb of Devakî, then your father Kâlanemi of previous birth will be born as Kamsa; and he would be cruel hearted and surely kill you all, no sooner you be born.
22. Vyâsa said :-- Thus because they were cursed, they took their births repeatedly and Kamsa, too, being urged on by the same curse, killed those sons of Devakî, the Sadgarbha, no sooner they were born.
___And here, for the true connoisseurs an ecstatically garbled OCR scan of MANMATHA NATH DUTT'S English translation of the relevant Harivamsa passage:
[quoted from here
Vishnu began to think (g). " Bhoja's descendant Kansa will destroy the first seven children of Devalti. In her eiy6th
conception I shall leave to live in her womb" (to). While thus meditating his mind flew where the Saragarbha DAnavas,
F , "J nlt(11Py Ila;i.ca, SL1L'lkl-r'ttlta,D3I111na, IZII?Vil7ardafla, tired
Krodhaharta were living in the water (t i). These immortal= like Saragarblras, the sons of -Kalanemi, $were powerful like tile celestials, were of effulgent persons and experts in battle (t2). Leaving their own grand-fattier Hiranyakasipu and wearing manned locks those Saragarbha Daityas worshipped the Grand-father of all, Brahma, with hard penances who, being pleased, conferred oil them the tollowing boon (r3-t4,.
BRAHMA said :-` 0 ye foremost of Danavas, I have been greatly pleased with your ascetic austerities. Express to me clearly your wishes, I shall grant them to you all." (I5).
Encouraged by Brahma's words the Daityas said "0 lord, if thou art pleased with us do thou confer upon us this best of boons. 0 Brahman, if thou art ready to confer upon us a boon, do thou grant us such a one as may render us unslayable by the gods, the huge Uragas, Yakshas, Gandharvas, Siddhas, Charanas, men and by the great Rishisever engaged in penances, whose weapons are their curses"
The Grand-fatPier was greatly delighted at heart with their ascetic observances and therefore affectionately said to them :-'`What, you have prayed for, will all be accomplished." Having conferred this boon on Saranarbhas the self-born repaired to the celestial region.
Thereupon Hiranyakasipu addressed them in angry words saying (r9-2o). " By your disregarding me and praying for a boon to the lotcas-sprung Brahma, you have become my enemies. I therefore have no affection for you and forsake you all. That father, who has given you the highsounding name of Sayagwrbha, will kill you all while in embryo (21-22.) 0 ye great Asuras Saragarblras, you all six will be born in order from Devaki and Kansa will kill you (23),»
VAISHAMPAYNA said :-Thereupon repairing to the nether region Vishnu arrived where Saragarblra Asuras, on accoufi~
of the- imprecation of I-Iiranyalcasipu, were living in the womb of water. He saw them lying there possessed by
death-like leep (2q.--25). Thereupon entering into the body of the Saragarbhas in a state of dream, Vishnu, having truth for his prowess, caught hold of their vital breaths and con-
signed them to the care of sleep. He said "O sleep, by my command take the vital airs of all these leading Danavas Saragarbhas and place them in order in the womb of Devaki (z6-23). They will be born of her womb and proceed to the abode of Death. Kansas efforts will be baffled and Devalci's labour will be crowned with success (2g). I wit show you such a favour that like me you will be powerful on earth and adored of all creatures (30). Thereupon when my gentle portion will be conceived by Devaki in her seventh conception, take that eldest brother of mine in the seventh month and place him within Rolini's womb (3I),