28-year-old Larson's sensitive, heart-rendering performance in 2015 drama "Room" won her the best actress Oscar earlier this year.
In "Captain Marvel", the actress will play Carol Danvers, who in the comics is a test pilot who gains superpowers after an encounter with aliens.
Larson was not sure how her casting would be perceived by the fans and she was wary of internet-trolling, which has become a celebrity's nightmare.
"Woke up this morning thinking about the tidal wave of support I got this weekend. It was nerve-racking to trust fall into the Internet! I know who I am, but it's wild how quickly you can forget once someone calls you something terrible. I was reminded how the acceptance of community is a deeply rooted need," she wrote on Instagram.
Also Read
"But I don't want to live worried people will hate me because I'm myself! We should all have the freedom to be our authentic selves without fear or judgement. It's scary to chip away at all the hardness we coat ourselves with to protect that perfect little being inside. Yeah, people can be mean, but they can also be so many other wonderful things too. Let's make this place a safe space," Larson wrote.
There has been a long history of knee-jerk reactions to comic book casting announcements dating back to 1988, when grumbles about "Mister Mom" star Michael Keaton being cast as Batman were heard in comic book stores all over the country.