Preheat the oven to 400F and cut 4 pieces of aluminum foil, large enough to wrap each piece of corn.
Peel back the husk from the corn (like peeling a banana) and cut off the end with a sharp knife. Then, remove any silk strands by rubbing them off with your hands or a brush.
Melt the butter in a small bowl and combine it with the garlic, salt, and pepper.
Place the corn in the middle of the foil, bring the sides up, and drizzle ¼ of the butter mixture on top of each ear of corn and twist to coat around. Wrap it in foil.
Bake:
Place the wrapped corn on a baking sheet and bake it for 30 minutes, flipping them over halfway through.
Remove from the oven, open the foil carefully, and you'll know they're done when the kernels are bright yellow and they pierce easily with a fork.