He is Australia's longest-serving detainee, having been left in bureaucratic limbo after India rejected his claims of citizenship, and no other country would accept him.
For the past month, he has been treated for depression in Glenside psychiatric hospital in Adelaide.
Mr Qasim, 31, said after being informed of his release: "Detention is a very bad place because you don't know how long you will stay. If you stay a long time, you forget the world outside."
He has been given a special visa that will allow him to live in Australia until he can be deported. Under the visa conditions, he can work and receive benefits, but still has to accept deportation if it is ordered.
Mr Qasim enjoyed his first night of freedom in seven years strolling round Adelaide. "Now I can be free and I can walk outside and I can enjoy my freedom," he said. "I don't know what my future is now but I am happy to have a chance to live a normal life."
He plans to indulge in some simple pleasures after his release, saying: "I will go and look for good food, spicy food, and that's all I'm thinking right now."
A couple in Adelaide have offered him a home, and he will talk with his doctors today about when he can leave hospital.
The opposition Labour Party has called for Mr Qasim to be allowed to stay in Australia permanently. The party's immigration spokesman said: "After seven years in detention for a man who, by all accounts, has done absolutely nothing wrong other than want to become an Australian citizen, surely they can give some certainty to his life."
Mr Qasim's plight has been highlighted by critics of the country's mandatory detention policy, which they describe as unjust and inhumane. Until last month, asylum-seeking families were forced apart, with men incarcerated in prison-like detention camps, and their wives and children housed outside.
The Australian government also agreed to free 50 other asylum-seekers who have been detained for more than two years, while their cases are considered.