Preheat the oven to 350°F (180°C). Line a baking sheet with parchment paper.
Add the piloncillo and water to a small saucepan over medium heat and cook for 10 minutes, until the sugar is completely dissolved and big brown bubbles form. Remove from the heat and set aside to cool.
Sift the flour, baking powder, salt, and cinnamon into a large bowl.
Add the butter and mash into the flour with a fork until combined. Add the orange zest and stir to incorporate.
Push the dry ingredients to the sides of the bowl to make a well. Add the vanilla, 1 egg, and cooled piloncillo syrup to the center. Using a fork, slowly mix the dry ingredients into the center until everything is evenly combined.
Cover the bowl with plastic wrap and refrigerate the dough for 30 minutes.
Lightly flour a clean surface and roll out the dough to a rectangle about ¼ inch (6 ½ mm) thick. Re-roll any dough scraps and cut out more cookies.
Using a 2½-inch (6 ½ cm) pig cookie cutter, cut out cookies and transfer to the prepared baking sheet.
Beat the remaining egg, then brush over the cookies.
Bake for 8–10 minutes, or until the edges are golden brown. Let the cookies cool before serving.