Barca will be investigated for alleged misappropriation of funds in the £48.6m deal with Santos.
Rosell, speaking at a news conference after a Barca board meeting, insisted: "I've always stated that we acted correctly with the Neymar transfer."
Vice-president Josep Maria Bartomeu now takes over from the 49-year-old.
Spanish national court judge Pablo Ruz this week accepted a lawsuit from Barcelona club member Jordi Cases, who has alleged that the amount paid was more than the reported fee.
Rosell continued: "For some time my family and myself have suffered threats and attacks in silence. These threats and attacks have made me wonder if being president means having to jeopardise my family.
"In recent days an unfair and reckless accusation of misappropriation has resulted in a lawsuit against me in the Audiencia Nacional. From the beginning I have said that the signing of Neymar Junior has been correct and his signing has caused despair and envy in some of our adversaries.
"The right of the club members to be informed needs to be compatible with the defence of the club and confidentiality of certain matters and facts. This confidentiality is essential in the world of football because otherwise the club could be damaged Dating Service.