Bewitched (1964–1969)
In 1964, York began playing Darrin Stephens in the sitcom Bewitched as Samantha's (Elizabeth Montgomery) mortal husband. The show was a huge success and York was nominated for an Emmy Award in 1968.
The crew built York a slanted wall on which he could lean between scenes; during the first two seasons, this allowed York to manage his back injury with little difficulty. Halfway through the third season, York's back injury was aggravated into a painful degenerative spine condition, frequently causing shooting delays while he required assistance to walk. Because York would sometimes be seized with debilitating pain, the scripts for some of his later Bewitched episodes were written and staged such that his character would be in bed or on the couch for the entire episode. York did not appear in several third- and fourth-season episodes, and his eventual departure from the show well into the filming of the fifth season necessitated more episodes focusing on Samantha and other members of her family, with mentions that Darrin was away on business.
While filming the fifth-season episode "Daddy Does His Thing", York fell ill: "I was too sick to go on. I had a temperature of 105, full of strong antibiotics, for almost 10 days. I went to work that day, but I was sick. I lay in my dressing room after being in make-up, waiting to be called on the set. They knew I was feeling pretty rotten, and they tried to give me time to rest. I kept having chills. This was the middle of the summer and I was wearing a sheepskin jacket and I was chilling. I was shaking all over. Then, while sitting on a scaffolding with Maurice Evans, being lit for a special-effects scene: They were setting an inky – that's a little tiny [spotlight] that was supposed to be just flickering over my eyes. That flickering, flickering, flickering made me feel weird. And I'm sitting on this platform up in the air ... and I turn to Gibby, a friend of mine on the set who was just down below, and I said, 'Gibby, I think I have to get down.' He started to help me down and that's the last thing I remember until I woke up on the floor. That's about all I remember of the incident ... and I'd managed to bite a very large hole in the side of my tongue before they could pry my teeth apart."
From York's hospital bed, he and director William Asher discussed York's future. "Do you want to quit?" Asher asked. "If it's all right with you, Billy", York replied. With that, York left the sitcom to devote himself to recovery, never to return. Dick Sargent replaced York in the role of Darrin Stephens, taking over the role at the start of the series's sixth season (1969–1970) and continuing in the part until the series ended after its eighth season (1971–1972). Sargent was originally offered the role of Darrin in 1964, but declined in favor of a part in the short-lived sitcom Broadside.
Despite the scripted antagonism between characters Darrin and his mother-in-law Endora, in reality Dick York and Agnes Moorehead enjoyed a very close friendship off screen. Moorehead was very upset when it was confirmed that York would be leaving the show and replaced by Dick Sargent.