1 million years ago?
Nobody knows when our ancestors learned to control fire. The oldest direct evidence comes from Wonderwerk Cave in South Africa, which contains ashes and burned bones from 1 million years ago. But there is evidence hominins were processing food even earlier, and that might have included cooking with fire.
See other: What Makes Humans Human?