The municipality is located on many islands in southern Troms county. Most of the municipality is located on the large island of Hinnøya, which is Norway's largest coastal island.
where Harstad shares a water border with Ibestad municipality. The city itself is located on the northeastern part of on Hinnøya; it is the only city on the island, and is popularly known as Vågsfjordens perle (The pearl of Vågsfjorden).
The town of Harstad was established as a municipality on 1 January 1904 when it was separated from the municipality of Trondenes. The initial population of the town of Harstad was 1,246. On 1 January 1964, the municipalities of Sandtorg, Trondenes, and Harstad were merged to form a new, combined municipality with a population of 17,882. Prior to the merger, Harstad had 3,808 residents. On 1 January 2013, the municipality of Bjarkøy (to the north) was merged with Harstad, forming a new, larger municipality of Harstad.