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.
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.