This technology already exists.
Step 1: grow trees (or any other plants, in fact)
Step 2: https://en.wikipedia.org/wiki/Wood_gas_generator
Not the most clean or efficient technology, to be sure, but has been around for almost 100 years now (the second part, the first part a bit longer).