He was born as Anirban Dhar in Samchi, Bhutan. His father Aparesh Dhar and mother Manjushree are of Bengali origin. Onir spent much of his childhood going to the cinema. Earlier, Aparesh Dhar had resigned from his position as a school principal when his Nepalese students were removed and arrested (they were later found dead). In Kolkata, Onir studied comparative literature and took a few film classes at Chitrabani film school. He graduated from Jadavpur University in 1989, but left before getting his post-graduate degree when he received a scholarship to study film editing at SFB/TTC in Berlin. He later returned to India and worked as an editor, scriptwriter, art director, music album producer and song/music video director.
In 1992, he directed and produced his first documentary film, 'Fallen Hero' based on painter Bijan Choudhury's life. He also served as an assistant to Kalpana Lajmi on Daman: A Victim of Marital Violence (2001) where he had his first experience directing a full-length feature film.
It was while working on a documentary about Dominic D'Souza, a champion swimmer and AIDS patient in Goa, that Onir conceived the idea for his first film. His directorial debut My Brother... Nikhil (2005) starring co-producer Sanjay Suri and actress Juhi Chawla deals with the Goan government's harsh treatment of AIDS patients in the 1980s and the stigma attached to them. My Brother... Nikhil was screened at several international film festivals and Juhi Chawla received an IIFA nomination for her role as the main character's supportive sister. It was screened at over 40 international film festivals, and won the Audience Choice Awards in Milan, LGBT film festival, Best Film & Jury Audience Choice Award at Montreal, image+nation Film Festival amongst others.
In 2006 he released his second film Bas Ek Pal with Urmila Matondkar, Sanjay Suri and Jimmy Shergill. He received a nomination for the Best Director Critic's Award at the Global Indian Film Awards for the film. It was not a financial success, only collecting 15–20 percent at the box office. His next film Sorry Bhai! also failed to do well as it released the week of the terrorist attacks in Mumbai.
Onir's next film was I Am which consists of four short films exploring such themes as single motherhood, displacement, child abuse and same-sex relationships. I Am won the National Award in two categories; Best Film and Best Lyrics. It was also the winnerof I-VIEW 2010s Engendered Award (New York) for Outstanding Contribution. Onir was awarded the 2008/9 Triangle Media Group Honorary Award on 7 February 2010 and won Best Film awards at both the London Asian Film Festival and the River to River. Florence Indian Film Festival and IRDS film awards for Best Director for Social Concern.
Together with Sanjay Suri, he has started Anticlock Films, a production company that will concentrate on promoting young directors such as Ashwini Malik (Kill Chhabra) and Bikas Ranjan Mishra who directed Chauranga, which was released on Netflix India. He also worked on Raising the Bar an Indo-Australian documentary about six youth with Down syndrome, which won the Hollywood International Independent Documentary Award. He recently completed his fifth directional film titled Shab (The Night), which is currently in post-production, scheduled to release in the first quarter of 2017. It is co-produced by Juspreet Singh Walia and Pong. He is also starting on his sixth directional film titled Veda.
In 2017, a short film "Aaba" (Grandfather) that he co-produced premiered at the Berlin International Film Festival.
He has one younger brother Abhishek Dhar, a theoretical physicist at International Centre for Theoretical Sciences, TIFR Bangalore, adjunct faculty at Raman Research Institute and winner of the Shanti Swarup Bhatnagar Prize for Science and Technology. His sister Irene Dhar Malik is a film and television editor.
Onir is an atheist. He can speak Bengali, Russian, German and Tamil. His favourite film directors are Ritwik Ghatak, Satyajit Ray, Luis Buñuel and Andrei Tarkovsky while he cites Shyam Benegal's Junoon as the reason he became a filmmaker. He is also one of the few openly gay directors in Bollywood.