In a medium bowl, whisk together the flour, baking soda, salt, cinnamon, ginger, nutmeg, and black pepper.
In the bowl of an electric mixer, beat the softened butter and sugar until smooth and creamy. Add the vanilla, molasses, and egg, mixing until thoroughly combined. Gradually add the dry ingredients and mix just until the dough comes together.
Divide the dough in half. Shape each half into a log approximately 2 inches in diameter. Wrap tightly in plastic wrap and refrigerate until firm enough to slice, approximately 1–2 hours.
Preheat the oven to 350°F and line two baking sheets with parchment paper.
Slice the chilled dough into 1/4-inch rounds using a sharp knife. Arrange on the prepared baking sheets and sprinkle with granulated or coarse sugar, if desired.
Bake at 350°F for 10–13 minutes, rotating the pans halfway through, until the edges look set. Cool on the baking sheets for 2 minutes, then transfer to a wire rack. The cookies will continue to firm up as they cool.
Store completely cooled cookies in an airtight container at room temperature. Refrigerate wrapped dough logs for up to 5 days or freeze for up to 3 months.
Notes
Make Ahead: Refrigerate tightly wrapped dough logs for up to 5 days or freeze for up to 3 months.
Cookie Thickness: Slice chilled dough into 1/4-inch rounds for even baking.
Drop Cookie Variation: Instead of making logs, portion the dough into 1-tablespoon balls and bake. This method produces flatter, rounder cookies with crisp edges.
Molasses: Use regular unsulphured molasses, not blackstrap.
For Soft Cookies: Avoid overbaking. Let the cookies finish setting as they cool.
Storage: Keep fully cooled cookies in an airtight container at room temperature.
Freezing: Thaw frozen dough logs in the refrigerator until firm but sliceable before cutting and baking. Confirm baking time with a test batch before publishing frozen-dough instructions.