Hawaii became a US territory when President William McKinley signed it into law.

McKinley also established the office of the governor of Hawaii. Sanford B. Dole was the first governor. In 1893 the Hawaiian monarchy was overthrown by a US-backed coup, and the new provisional government set plans in motion to allow the US to annex Hawaii. It took nearly seven years to come to pass. It wasn’t until 1959 that Hawaii was admitted as a US state.

Source