Combine the cornmeal, flour, sugar, baking powder, salt, and cayenne pepper in a large mixing bowl.
1 cup (138g) cornmeal, 1/2 cup (71g) all-purpose flour, 2 Tablespoons (25g) granulated sugar, 1 1/2 teaspoons baking powder, 1/2 teaspoon salt, 1/4 teaspoon cayenne pepper
In a separate bowl, whisk together the egg, and buttermilk. Add to the dry ingredients along with the grated onion and its juices, stirring until combined.
1 large egg, 3/4 cup (169g) buttermilk, 1/2 small onion
Heat 2 inches of oil over medium-high heat in a large cast iron skillet or dutch oven until it reaches 375°F on a digital thermometer. When hot, carefully use two spoons to drop tablespoonfuls of batter into the hot oil, using the back of one spoon to push the batter in one at a time. Work in batches so as not to overcrowd the pan. Fry for 2-3 minutes, turning partway through with a wire spatula, until the hush puppies are golden brown.
Peanut or vegetable oil
Remove the hush puppies from the oil and transfer to a wire rack set over a baking sheet lined with paper towels. Keep an eye on the oil temperature while frying so that it stays consistent, adjusting the heat up or down as necessary.