Flag of Ottoman Empire was the first flag featuring a crescent with a star. Other states formerly part of the Ottoman Empire also used the symbol, so the symbol emerged into popular use.
Notes
↑“The Official National Islamic Symbol or Insignia of Pakistan” “Shall be the traditional Crescent and Star of the Muslim faith” respectively