Now the 24-year-old actress will be seen starring in the film which will be directed by Joe Wright.
'Joe and Keira are looking forward to working together again immensely,' says a friend of the 37-year-old director.
In August, it was reported that Knightley had been forced to compete with Johansson, 24, for the role of the Cockney flower seller played by Audrey Hepburn in the 1964 film, reports The Telegraph.
'I have two actresses as potential Elizas, one British, the other American,' said Sir Cameron Mackintosh, who is producing the film with Duncan Kenworthy, at the time.
'You'd know their names, but I'm not letting on,' he added.
Recently, Kenworthy said: 'I think Keira would be absolutely fabulous in it.'
Emma Thompson is writing the film's script, for which Daniel Craig has been mooted as a possible Professor Henry Higgins.
Keira Knightley takes on Audrey Hepburn
She could bag next year's Best Actress Oscar
Scarlett Johansson weds
Susan Boyle gets sensational makeover
Kangna: The New Age Audrey Hepburn?