Vilanova, 44, had a tumour removed from a salivary gland in his throat in November 2011 and in December 2012 suffered a relapse, requiring further surgery and then 10 weeks of chemotherapy and radiotherapy in New York.
Vilanova returned to the helm of Barcelona in March and led the club to the Spanish league title but stepped down evening.
, Barca's website carried his farewell letter.
"After five wonderful years (including a spell as Pep Guardiola's assistant) being part of a team who have made the dreams of any coach reality the moment has come to confront a change in my professional life to dedicate my energies to continuing the process of (battling) the illness diagnosed a year and a half ago," wrote Vilanova.
"The treatments I must follow from now on mean it is not recommended, in the doctors' opinion, to dedicate myself 100 percent to the tasks of first team coach of FC Barcelona, but I shall continue to be close to and carry on working for this club which I love so much in other sporting tasks.
"It is not easy to leave this group of such special people, the players, the staff and the friends with whom I have shared such unforgettable experiences," said Vilanova, who praised the club's "human quality" while stressing his "eternal gratitude" to the club.
Vilanova also thanked the medical staff for their support and said he thanked "with all my heart" all those connected with the club, including the fans for their support.
He also insisted: "I am calm, strong and will confront this new stage in the process of my illness in the fullest confidence that all will go well." At the same time, he requested privacy now he is away from the spotlight as he confronts the illness with his family.
He signed off by writing: "I would not like to end this letter without wishing good luck and all the best the the new coach of the best team in the world."
Meanwhile, Guardiola, now in charge of Bayern Munich in Germany, said his thoughts were with Vilanova.
"It is very diffcult for me to talk about this subject in German. (Vilanova) is a close friend of mine and I love him very much," said Guardiola in comments carried by Spanish media.
He added: "I can only wish him and his family the best as they confront this difficult moment with strength. This is very, very tough for me," he went on.
Both men have been caught up in recent days in something of a war of words after Guardiola, coming off a year-long US sabbatical, accused the Barcelona board of using Vilanova's illness to "damage" him.
Guardiola felt moved to deny he has missed a chance to visit Vilanova while he was being treated in New York.
"I will never forget that they used Tito's illness to cause me damage, because it's a lie that I never saw him in New York," he said.
However, Vilanova hit back this week by saying no-one on the Barcelona board had used his illness to attack him.
Vilanova said that "Pep got it wrong and I'm surprised by his comments. No one on the board used my illness to attack him."
And Vilanova added: "He visited me once in New York when I had just arrived, but during my recovery from the operation I was there for two months and I didn't see him. He's my friend and I needed him, but he wasn't there for me. I would have done things differently. I won't say anything else about this."