Heat a heavy skillet over low heat for 2 to 3 minutes.
Toast the allspice berries until fragrant, about 1 minute, then roughly crush.
Combine the rum and crushed allspice berries in a quart-sized glass jar, seal the lid tightly and give it a good shake.
Steep for 10 days.
Strain the allspice-infused rum through a fine-mesh sieve into a small saucepan and add the sugar.
Heat over low, stirring occasionally, until the sugar is fully dissolved, about 15 minutes.
Cool to room temperature before storing in a glass jar or bottle.
