The incident occurred in D.N. Nagar in Juhu area of western Mumbai at 11.40 a.m. when the unidentified person, between 25 and 30 years of age, tried to barge into the office. He fired a bullet on the ground.
An alert office boy slammed the entrance door and locked it from inside, Bhatt's employees said.
The man walked into Bhatt's Vishesh Films office on the third floor and told the receptionist that he wanted to see the filmmaker.
On being told that both Mahesh Bhatt and his brother Mukesh were not in the office, the gunman fired at the ground from the revolver and walked out and left with two people who were waiting for him outside.
They sped away on a black coloured Pulsar motorcycle, onlookers said.
Police said the man had earlier pointed his gun at the office accountant who had stopped him and asked his name.
Meanwhile, unconfirmed reports said the incident was masterminded by gangster Ravi Pujari who has "decided to eliminate" Bhatt.
The police launched a search for the gunman. A sketch is being prepared of the person involved from the account given by witnesses.
Bhatt said he did not suspect the role of the underworld.
Speaking to a news channel, the filmmaker, known for his outspokenness, denied receiving threats from the underworld.
"Some people did call me up and abused me to vent their frustration but they had nothing to do with the underworld," he told the news channel.
The filmmaker, who has expressed strong views in the past on socio-political issues, also denied that the attack was related to his plea to the Supreme Court to intervene on the ban on the Aamir Khan-starrer "Fanaa" in Gujarat.