In a mixing bowl, combine the cornmeal, all-purpose flour, baking powder, baking soda, salt, and pepper. Whisk together until well mixed.
In a separate bowl, whisk together the buttermilk, chopped onion, and the egg.
Pour the wet ingredients into the dry ingredients and stir until just combined. Be careful not to overmix; a few lumps are fine.
Heat the vegetable oil in a deep fryer or large pot to 365°F (185°C).
Using a spoon or a small scoop, carefully drop spoonfuls of the batter into the hot oil. Fry the hush puppies in batches to avoid crowding the pot.
Cook for about 3 to 4 minutes, or until they are golden brown, turning them if necessary.
Using a slotted spoon, remove the hush puppies from the oil and transfer them to a paper towel-lined plate to drain excess oil.
Serve warm as an appetizer or side dish, and enjoy!