Though modern humans and our closest evolutionary relatives, the great apes, shared a common ancestor millions of years ago, most similarities stop there. We live on the ground, walk on two legs and have much larger brains.
That doesn't mean the larger brains evolved first.
The first populations of the genus Homo emerged in Africa about 2.5 million years ago and though they already walked upright, their brains were only about half the size of today's humans. These earliest Homo populations in Africa had primitive ape-like brains - just like their extinct ancestors, the australopithecines.