Mr Justice Mould denied Epping Forest District Council's request for an injunction to block migrants from being housed there.
The council had initiated legal action against Somani Hotels, alleging breaches of planning regulations after the hotel became a site of protests.
The judge determined that using the hotel for asylum seekers was not a significant breach of planning control and that safety concerns were a matter for the police.
The Home Office intervened, arguing that the loss of accommodation would be substantial given the high demand for asylum housing.