In a small saucepan over medium-high heat, stir together water, sugar, cinnamon sticks, sliced ginger, star anise, and heat, stirring frequently, until the sugar has completely dissolved. Bring mixture to a boil and allow to simmer for 4-5 minutes. Remove from heat and allow mixture to cool completely.
Using a slotted spoon, remove spices from liquid and pour into bottle or jar. Mixture can be refrigerated for at least two weeks.