Shabana Azmi, an Indian actor, recently kicked up a stir by claiming that Muslims cannot easily buy homes in Mumbai. This may well be true: but as someone who recently looked for a place to rent in the city, I assure Azmi that there is a category of person even less wanted in this city than the Muslim. I belong to this category.

Mumbai's real-estate market suffers from a perpetual shortage of good, affordable housing. Landlords are picky. The lack of any real anti-discrimination law in the city means that the rental market is a bigot's paradise. Some landlords rent only to non-Muslims; some turn down Hindus; some permit only vegetarians in their flats. But almost none of them will gladly rent to a bachelor.

In the rest of the world, unmarried men are called by their proper, varied names – singleton, gay, divorced, celibate – but Indian society still lumps them into one Victorian-era category: the bachelor. And the landlords of Mumbai want nothing to do with this fellow. Where the bachelor lives, there the orgy follows; this is the great fear. In the landlord's imagination, half-clad women appear and disappear all day long through the bachelor's door; gasps of illicit pleasure rent the middle-class composure of the building; disgrace and scandal follow. Interestingly, the unmarried woman is not regarded as a sexually depraved type, and many landlords are prepared to rent to them. It is only the bachelor who is taboo.

Like so many of the stereotypes cherished by Indians, this one needs to go. All the unmarried men I know are hard at work – on a screenplay, a novel, or trying to find a wife. It's the fellows with the wedding rings, I notice, who get up to the debauchery. But even in India's most liberal city, old attitudes are surprisingly resilient.

I spent a week looking for places – and got told the same thing every time I liked a flat. Even if the landlord was bachelor-tolerant, he was helpless; many of Mumbai's buildings have rules that explicitly forbid unmarried men from renting or buying apartments. Especially my kind of unmarried man. Three species of bachelors inhabit Mumbai, it turns out. First comes the "company bachelor" – the fellow who works for American Express or another multinational; most landlords will take him on, grudgingly. Lower down the real-estate food chain is the "married bachelor" – who is living alone, but has a wife in Canada (or so he says). Last comes the "single bachelor" – no company job, no wife in Canada. This is me. Making things worse is that I describe myself as a "writer", a category that doesn't mean anything to the landlords of Mumbai; any young man sitting in front of a computer and typing all day must be playing games of some kind. Instead of doing solid, virtuous things like looking for a wife.

In Versova, a beach suburb in the far north of the city, I saw a second-floor sea-facing apartment with large glass windows. The waves came almost to the foot of the building. I imagined myself here, at a table, drawing energy from the ocean and hammering away on a Remington: I could turn out a hundred pages a day here – I could write a Les Miserables in a year.

"Just one question," the landlady said on the day we were to sign the lease. "When is your wife coming to join you?"

I explained; she stopped smiling.

"The last tenant was a married bachelor," she said. "He had a wife in Delhi, but he lived alone in this flat. And guess what he was doing here?"

"Tell me," I said, my heart sinking.

"He was familiar with young ladies."

"You don't say."

"And he was coolly running a brothel service. In this very flat."

The waves at Versova will never beat near my Remington. Some other writer will finish his Les Miserables in that flat – with his wife looking over his shoulder.

After two weeks of hunting, I did find a place – at a price far below what I was prepared to pay, and in a part of town with too much noise and pollution. I'd like to get out of here in a few months, but where can a bachelor go? A cousin of mine suggests that there is only one solution: marriage. Otherwise I should just pack up and move to Bangalore. He's probably right. I love Mumbai, but my time here may be drawing to an end. This city's not for bachelors.