The couple, in their 30s, from south Warwickshire, cannot be named to protect the girl's identity.
Judge Andrew Lockhart QC said: "It is the responsibility of those with the gift of children to look after them and prepare them for life with love and kindness.
Great trust is placed in the hands of those who are parents; and when that trust is broken, great damage is done to the child and to society.
"You planned to have a child together, but were told it was not possible.
"You both then decided that one way forward would be for her to become pregnant and for you to raise the child.
"That was a wicked thing to do. It had no regard for her age or for the future damage it would do, or for her welfare or the welfare of any child that might be born.
"This was not just rape, but rape with the intention of ensuring the pregnancy of a 12-year-old child."
The court heard the girl's mum had 'actively encouraged her to become pregnant" after she began a relationship with the man after meeting him online.
Prosecutor Steven Bailey said "an unhealthy atmosphere" developed in their home, with the man mistreating the children and the mum taking his side against them.
The mother had been sterilised, but after the couple began their relationship she asked her GP if it could be reversed, and was told it could not.
Mr Bailey said: 'That did not please the defendants, so they decided to do the next best thing.
"With no regard for the feelings of the girl, let alone the baby they were about to force on her, the plan was for him to have sex with her to get her pregnant as a surrogate.
"The girl says her mother told her they wanted her to get pregnant by him, and her mother is on record as describing the pregnancy as a Godsend."
The girl had been raped each time after her cycle had been monitored to ensure it took place at the best time for her to conceive.
Mr Bailey said it was not known if the mum was party to the actual rapes, "but she sought to take advantage of it for her own ends."
The couple were caught after their GP became suspicious when he confirmed the girl was pregnant and she told a teacher her step-father had "made me do it."
Mr Bailey said: 'Those and other disclosures, including when she told a social worker that he had had sex with her and was the father of her baby, led to her first interview with the police.
"She had been raped by her step-father and was pregnant by her mother's encouragement."
The girl bravely confided in a teacher, saying her mum had 'sacrificed' her for the chance of a baby.
Mr Bailey said: 'She [the girl] told the teacher 'She made me do it. He raped me, but she asked me to do it, my own mum'."
The court heard the man originally denied rape, suggesting his partner had artificially inseminated the girl with his semen.
But on the first day of their trial, both changed their pleas to guilty.
Amy Jackson, defending the step-father, said: 'He fully accepts what he did to this young girl.
"He says he's sorry for what happened, and that they should not have put her through it.
"This is a grave and unusual case. It is born of a selfish wish by these defendants to have a child, and the use of a child to achieve those desires."
Nick Devine, defending the woman, said: 'I accept this is a serious and unpleasant case. She only has herself to blame, but she has lost everything in her life as a result.'