In a large bowl, whisk together the cornmeal, flour, sugar, baking powder, salt, baking soda, and pepper.
In a separate bowl, whisk together the buttermilk and egg until the egg is well beaten. Add the wet mixture and grated onion to the cornmeal mixture and stir until well combined. Let the batter rest for 10 minutes.
Meanwhile, heat 2 inches of oil in a large cast-iron skillet or Dutch oven until it reaches 350°F on a deep-fry thermometer. Line a large baking sheet with paper towels.
Using 2 spoons, drop tablespoonfuls of batter into the hot oil. (Use the back of one spoon to push the batter off the other spoon, one at a time.) Work in batches to not overcrowd the pan.
Fry until golden brown, turning halfway through, about 3 to 4 minutes total. Remove hush puppies using a slotted spoon or spider strainer and drain on the paper towels. Serve hot.
Notes
Don't overmix the batter. The hush puppies will turn out tough instead of fluffy.
Let the batter rest. This will give the cornmeal time to absorb moisture so the batter thickens up well enough to scoop.
Use a small cookie scoop. This perfectly portions each hush puppy. If you don't have one, two spoons still work great!
To ensure accurate oil temperature, use a frying thermometer or digital thermometer to make sure the oil temperature remains at 350°F. You want to wait for the oil temperature to rise to the correct temperature before adding another batch. You can adjust your burner as well, as needed, to keep the oiling from getting too hot or too cool.
Work in batches. Overcrowding the pot will cause the oil temperature to drop, leading to soggy hush puppies. They can also stick together in the oil if there isn't enough space for them to move around and crisp up on the outside.