Preheat the oven to 350°F (180°C). Line a cupcake pan with paper liners.
In a medium bowl, whisk together the all-purpose flour, baking soda, ground cinnamon, ground ginger, ground nutmeg, ground allspice, and salt. Set aside.
1 ½ cups all-purpose flour, 1 teaspoon baking soda, 1 ½ teaspoons ground cinnamon, 1 teaspoon ground ginger, ½ teaspoon ground nutmeg, ¼ teaspoon ground allspice, ¼ teaspoon salt
In the bowl of an electric mixer fitted with a paddle attachment, beat the unsalted butter and dark brown sugar on medium speed until light and creamy, about 2 minutes.
½ cup unsalted butter, ½ cup dark brown sugar
Beat in the egg until fully combined. Add the molasses and mix again—it may look slightly clumpy, which is normal.
1 large egg, ½ cup molasses
Gradually pour in the whole milk, then slowly add the dry ingredients. Mix just until combined, scraping down the sides of the bowl as needed. Avoid overmixing.
½ cup whole milk
Spoon the batter into the cupcake liners, filling each about two-thirds full.
Bake for 18 to 20 minutes, or until the tops spring back when gently pressed and a toothpick inserted in the center comes out clean.
Allow the cupcakes to cool in the pan for a few minutes, then transfer them to a wire rack to cool completely before frosting.
In a medium bowl, beat the softened cream cheese, unsalted butter, and powdered sugar together until smooth and creamy. Mix in the pure maple syrup and vanilla extract until fully combined.
4 ounces cream cheese, ¼ cup unsalted butter, 2 tablespoons pure maple syrup, 1 teaspoon vanilla extract, 2 cups powdered sugar
Beat on low speed at first, then increasing to medium-high speed until the frosting is light and fluffy.
Spread or pipe the frosting onto the cooled cupcakes. For an extra festive touch, sprinkle with ground cinnamon or holiday sprinkles if desired.