“The Boy Who Harnessed the Wind,” the directing debut of the actor Chiwetel Ejiofor, is so worthy, so earnest and so achingly sincere that it’s almost painful to criticize. Yet even if you know nothing of its real-life hero, the Malawian engineer William Kamkwamba (whose 2009 memoir was the basis for this dramatization), you will know exactly where this well-intentioned tale is going: it’s right there in the title.

We’re introduced to 13-year-old William (the delightful Maxwell Simba) in 2001, in his village in rural Malawi where lengthening cycles of drought and heavy rains are making harvests increasingly precarious. His parents, Trywell (Ejiofor, terrific as always) and Agnes (an affecting Aïssa Maïga), are determined to give their children an education. But when they’re unable to pay William’s school tuition, the boy — whose aptitude for fixing small appliances is already evident — takes to the library to teach himself. It’s not long before he’s fending off famine by repurposing scrap metal and bicycle parts into an ingenious irrigation system.