Earlier this year, doctors told the 74-year-old former "Mary Tyler Moore" actress that she had terminal brain cancer and only three to six months to live.
During the DWTS season 17 premiere on Monday night, Harper received a standing ovation.
She told In Touch magazine: "I think the show will play a major part in my recovery... At first I didn't really want to do it. I really love the show, but I was afraid... I prefer to live as though this is all we have, because we could drop dead at any given moment. When life asks you to dance, you just have to dance."