In a medium bowl, I whisk together flour, baking soda, salt, and all the spices. This evenly distributes the leavening and spices. It also prevents clumps later in the batter.
In a large bowl, I beat the softened butter and brown sugar until light and fluffy. This step adds air to the batter, which helps the cupcakes rise nicely.
Next, I mix in the molasses, egg, and vanilla extract. I scrape down the bowl to make sure everything blends evenly. The batter should look smooth and glossy.
I slowly add the dry ingredients to the wet mixture, alternating with milk. This keeps the batter smooth and prevents overmixing, which can make cupcakes dense.
I divide the batter evenly among the liners, filling each about two-thirds full. This gives them room to rise without overflowing.
The cupcakes bake for about 18–20 minutes until a toothpick inserted in the center comes out clean. I let them cool completely before frosting or serving.