Ron Howard is stepping in to direct the coming stand-alone Han Solo film, two days after Philip Lord and Christopher Miller were ousted from the job. They had spent four and a half months on the as-yet-untitled space western.

The highly anticipated “Star Wars” spinoff, slated for a May 2018 release, follows the adventures of the wisecracking swashbuckler Han Solo as a young pilot, played by Alden Ehrenreich. Woody Harrelson and Thandie Newton are also on board.

Kathleen Kennedy, the president of Lucasfilm, said in a statement announcing Mr. Howard’s involvement that the studio had an “absolute commitment to make a great movie,” and that filming would resume July 10. Mr. Howard’s credits include “Apollo 13” (1995), “Frost/Nixon” (2008), and, more recently, the poorly reviewed “In the Heart of the Sea” (2015).

Ms. Kennedy had cited “different creative visions” in the decision to drop Mr. Miller and Mr. Lord, who are known for wry antics-filled hits like “The Lego Movie” and “21 Jump Street.” In the same statement, the directors agreed, saying their vision and process weren’t aligned with that of the studio heads.