Heat oil in a deep-fryer or large saucepan to 375 degrees F (190 degrees C).
Whisk buttermilk, white sugar, and eggs together in a bowl. Mix flour, baking soda, baking powder, salt, nutmeg, and cinnamon together in another bowl. Stir buttermilk mixture into flour mixture until combined; add butter and knead until a soft dough forms.
Turn out dough onto a lightly floured work surface and roll to 1/4-inch thick. Cut dough into doughnut shapes using a 2 1/2-inch doughnut cutter.
Beat confectioners’ sugar, margarine, and vanilla extract together in a bowl until smooth. Gradually add milk, stirring constantly, until desired glaze-consistency is reached.
Working in batches, cook doughnuts in hot oil until golden brown, about 1 minute per side. Transfer cooked doughnuts to a paper-towel lined plate to drain. Dip hot doughnuts into glaze to coat.