The Edinburgh School of Business has lost the right to act as a sponsor in order to obtain visas for those taking courses there.
The business school, based in Hay Avenue in Niddrie, has gone to the Court of Session to challenge the decision.
Its lawyer, Alastair Kinroy QC, told judge Lord Philip that students were "panicking", adding that "morale is badly affected".
Students who needed visas to remain at the school would either have to find places at other colleges or leave the country, the court heard.
Mr Kinroy accused the UK Border Agency of conducting "an incompetent and incoherent" investigation into the business school, which has a large number of international students enrolled at the institution.
This had led, said the lawyer, to "an irrational and unwarranted belief that the school was a bogus college".
In March 2006, the then-Home Secretary introduced rules for issuing visas to foreign students coming from outside the European Union.
Education providers needed a licence to ensure their students met entry requirements and had leave to remain in the country throughout their courses.
To obtain such a licence, the institutions had to pay a fee and also train staff to look after the sponsorship arrangements and record keeping, reporting students who failed to attend or who quit their studies.
One of the reasons for the fall-out between the Edinburgh School of Business – which has 400 students and a staff of 20 – was an allegation of bad record keeping. In the case of 15 students, the register "over-stated" their attendance.
Mr Kinroy admitted that some of the paperwork at the school was in disarray, but said that was the responsibility of one member of staff who faced disciplinary action.
He insisted that the school was a reputable education provider and said it was extraordinary that the UK Border Agency should take away its licence for what was "an honest and excusable error".
Lord Philip was told that courses there had the approval of professional industry bodies.
All its main teaching staff had a masters degree, at least, and many had MBAs or PhDs. Some lecturers also taught part-time at Scottish universities.
The UK Border Agency is opposing the school's request for a judicial review of their decision of 21 May.
After hearing initial arguments yesterday, Lord Philip decided the issue should be fully debated at a hearing next week.