"I had a series of things falling apart, a breakdown of my marriage, a dispute with the AFI, I lost my reviewing job. I didn't have any money and I took to drifting, more or less living in my car, drinking a lot, fantasizing. The Pussycat Theater in L.A. would be open all night long, and I'd go there to sleep. Between the drinking and the morbid thinking and the pornography, I went to the emergency room with a bleeding ulcer. I was about 27, and when I was in the hospital, I realized I hadn't spoken to anyone in almost a month. So that's when the metaphor of the taxi cab occurred to me—this metal coffin that moves through the city with this kid trapped in it who seems to be in the middle of society but is in fact all alone. I knew if I didn't write about this character I was going to start to become him—if I hadn't already. So after I got out of the hospital, I crashed at an ex-girlfriend's place, and I just wrote continuously. The first draft was maybe 60 pages, and I started the next draft immediately, and it took less than two weeks."
For the movie's fortieth anniversary, Gregg Kilday in The Hollywood Reporter presents an oral history of Taxi Driver.