Swathi Palisetty, a student of computer studies at the University of Bedfordshire in Luton town, was held for 17 hours by UK Border Agency (UKBA) officials at the airport after she returned from a trip to India in December 2011.
The officials had wrongly concluded that she was not registered at the college, a British High Court heard.
Palisetty was later sent back to Hyderabad after her detention, BBC reported.
She sued the Home Office over her detention, saying she had been blocked from United Kingdom on the mistaken basis of working as a nanny.
Also Read
Palisetty's barrister said that the Border Agency's assumption that she had been working was "unjustified" and its officers had failed to check the visa database or make direct inquiries with the university.
During the court proceedings, the Border Agency contended that Swathi was not able to provide agency officers with details about her course modules and that she did not have a good grasp of English when she tried to return to UK from India, the report said.
The University of Bedfordshire removed her from its register after she was allowed back in the country in late 2012.
The University told the Home Office that they were not confident about Palisetty's ability to continue the course and therefore did not reinstate her.
Though ruling in her favour, Justice Slade said the student was "prepared to lie when it suits her".
"She was not a good student and she had not successfully completed many modules," the judge said, adding, she was unlikely to succeed in obtaining her qualifications.
Palisetty also claimed that her detention had contributed to her failure to get her degree but the high court rejected her attempt to recover the course fees, the report said.