The star of Suicide Squad, I, Tonya and Mary Queen of Scots will also produce the movie through her production company, LuckyChap Entertainment.
In a statement, Robbie said playing with the doll promoted "confidence, curiosity and communication".
"I'm so honoured to take on this role that I believe will have a tremendously positive impact on children," the Australian actress continued.
Robbie, 28, said she could not have imagine "better partners" than Warner Bros and Barbie creator Mattel.