The offence came to light after Christopher Andrew Alexander, 23, and the girl lied at her school one day, pretending her mother had suddenly gone into hospital and she needed to leave urgently.
He told staff at the school he was her carer so they would allow her to go with him but in reality they just wanted to spend time together and she was not seen until the next day, leading to his being charged with abduction.
Alexander, then of Hawthorne Terrace, Ossett, Wakefield, admitted abduction and sexual activity with a child.
Stephen Grattage, prosecuting, said Alexander was warned by police in January about the girl's age after she had gone missing for a time.
He told them he thought she was 17 and would not continue to see her.
Alexander was also sent a written warning about not harbouring the girl because of her age but resumed seeing her. After the school incident in March, genetic DNA tests on a condom and clothes showed they had recently had sex.
Tim Stead, for Alexander, said the abduction "owes more to mutual deceit rather than what is normally meant by abduction".
The girl was now 16 which would have meant the sex offence was no longer illegal.
He said Alexander was immature for his age and was having a wretched time while in prison for the first time.
In sentencing Alexander, Recorder of Leeds Judge Peter Collier QC said it seemed he had problems and not been able to form a relationship with people his own age but that did not excuse his actions after being warned of the girl's age.
They had told lies to her school to get together on the day concerned.