Vilanova said he was resigning because his doctors told him the new treatment he will pursue was incompatible with the "responsibilities of the first team coach."
He said he would, however, continue "working for this club that I love so much in other areas of sports operations" without specifying his role.
Vilanova thanked the support shown to him by the club, its president Sandro Rosell, sports director Andoni Zubizarreta, the team doctors, the club's fans, others who had reached out to him, and said it "wouldn't be easy" to leave his players.
He didn't mention former coach Pep Guardiola, adding another element to the unexpected souring of their relationship.
Guardiola brought Vilanova in as his assistant with Barcelona's second team in 2007. After securing its promotion to the second division, the pair took control of Barcelona's first team and together led it on an unprecedented run of 14 titles from 2008-12. When Guardiola quit last summer, Vilanova was promoted to manager and guided Barcelona to its fourth Spanish league title in five seasons.
But their friendship began to fray when Vilanova sought treatment for his cancer at a New York hospital last winter, coinciding with Guardiola in his sabbatical before he took over German club Bayern Munich.
Guardiola recently accused Barcelona and club president Rosell of "using Tito's illness to attack him," without giving any clear explanation as to how he had been hurt by his ex-boss.
Vilanova responded in turn by defending the club and accusing Guardiola of not being there for him when he needed him.
"But during my recovery, I spent two months there and did not see him, and that wasn't due to me. He was my friend and I needed him and he was not there for me. I would have acted differently," Vilanova said on Tuesday in his last press conference as Barcelona's coach.