In a mixing bowl, combine cornmeal, flour, baking powder, and baking soda. Stir in the sugar, salt, Cajun seasoning, and cayenne pepper.
Whisk in the buttermilk, eggs, melted butter, and grated onion until the batter is smooth and consistent. Let the mixture sit for about 10 minutes to allow it to thicken.
In a large heavy pot or Dutch oven, heat about 2 inches of oil over medium-high heat until it reaches 350°F. You can test the temperature by dropping a small piece of bread into the oil; it should sizzle immediately.
Line a baking sheet with paper towels and keep it nearby. Drop spoonfuls of batter into the hot oil, making sure not to overcrowd the pot. Fry the hush puppies for 2 to 3 minutes, turning them halfway through, until they turn a deep golden brown.
Using a slotted spoon, transfer the cooked hush puppies to the paper towel-lined baking sheet. Continue frying the rest of the batter. If the hush puppies are cooking too quickly, reduce the heat slightly to maintain the oil at 350°F. Serve warm.
Leftovers can be stored in an airtight container in the refrigerator for up to 2 days or frozen for up to 3 months. Reheat in a 350°F oven for 15 to 20 minutes for best results.