The 17-year-old, who cannot be named, committed the offence while on a community payback order he received for having sex with a 12-year-old girl when he was 14.
A court heard that he had sex with the 13-year-old in the grounds of Dundee and Angus College.
The meeting was arranged on Snapchat.
Dundee Sheriff Court heard how the pair had met through mutual friends in 2015 but there was no contact between them until June 2016 when he added her on the social networking app.
Fiscal depute Eilidh Robertson said that when they met they chatted for some time and the accused was immediately affectionate towards the girl, kissing and cuddling her.
"He told her he had been 'choking to go with her' and they then walked towards the college," Ms Robertson said.
"He repeatedly asked her if she would have sex with him, and when in the grounds of the college he said 'have sex with me there' and pointed to a grassy area.
"They went there and had sex, after which he stood up and said he had to leave."
The girl's mother picked her up before the 13-year-old told her what had happened the next day.
She then told a counsellor who called in police.
The teenager was given a community payback order last year for his previous sex offence conviction.
Sheriff Alastair Carmichael told him that custody was the only option this time because he did not appear to have learned from his previous community sentence.
The 17-year-old pleaded guilty on indictment to a charge under the Sexual Offences (Scotland) Act.
Defence solicitor Katrina Clark urged the court to impose a second community payback order instead of a jail term.
She said: "He's aware he faces more time in custody.
"The more effective way forward for him would be through the intensive project outlined for him in the social work reports. That wouldn't be an easy option.
"This could be dealt with by a non-custodial sentence due to his age, the period he has spent in custody on remand and his acceptance of his guilt at an early stage."
Sheriff Alastair Carmichael imposed a one-year sentence of detention on the teenager, placed him on the sex offenders register for 10 years and imposed a sexual offences prevention order for six years during which time he will be monitored by specialist police officers.
He said: "Unfortunately from your perspective no other method than custody is appropriate.
"I've come to that decision based on the gravity of the offence and also because you were subject to a CPO with specialist elements which you don't appear to have learned from."
A convicted teenage sex offender has been detained for a year for having sex with a 13-year-old girl in the grounds of a Dundee college campus.