It was established in 1967 as the San Diego Rockets, an expansion team originally based in San Diego. In 1971, the Rockets relocated to Houston.
The Rockets won only 15 games in their debut season as a franchise in 1967. In the 1968 NBA draft, the Rockets were awarded the first overall pick and selected power forward Elvin Hayes, who would lead the team to its first playoff appearance in his rookie season. The Rockets did not finish a season with a winning record for almost a decade until the 1976–77 season, when they traded for All-Star center Moses Malone. Malone went on to win the NBA Most Valuable Player (MVP) award twice while playing with the Rockets and led Houston to the Eastern Conference Finals in his first year with the team. During the 1980–81 season, the Rockets finished the regular season with a 40–42 record but still made the playoffs. Led by Malone, the Rockets reached their first NBA Finals in 1981, becoming only the second team in NBA history to do so with a losing record. They would lose in six games to the 62–20 Boston Celtics, led by Larry Bird, Robert Parish, and future Rockets head coach Kevin McHale. As of 2019, the 1980–81 Rockets are the last team since the 1954–55 Minneapolis Lakers to make it all the way to the NBA Finals with a losing record.
In the 1984 NBA draft, once again with the first overall pick, the Rockets drafted center Hakeem Olajuwon, who would become the cornerstone of the most successful period in franchise history. Paired with 7 feet 4 inches (2.24 m) Ralph Sampson, they formed one of the tallest front courts in the NBA. Nicknamed the "Twin Towers", they led the team to the 1986 NBA Finals—the second NBA Finals appearance in franchise history—where Houston was again defeated by Larry Bird and the 67-win Boston Celtics. The Rockets continued to reach the playoffs throughout the 1980s, but failed to advance past the first round for several years following a second-round defeat to the Seattle SuperSonics in 1987. Rudy Tomjanovich took over as head coach midway through the 1991–92 season, ushering in the most successful period in franchise history. Led by Olajuwon, the Rockets dominated the 1993–94 season, setting a franchise record 58 wins and went to the 1994 NBA Finals—the third NBA Finals appearance in franchise history—and won the franchise's first championship against Patrick Ewing and the New York Knicks. During the following season, reinforced by another All-Star, Clyde Drexler, the Rockets—in their fourth NBA Finals appearance in franchise history—repeated as champions with a four-game sweep of the Orlando Magic, who were led by a young Shaquille O'Neal and Penny Hardaway. Houston, which finished the season with a 47–35 record and was seeded sixth in the Western Conference during the 1995 playoffs, became the lowest-seeded team in NBA history to win the title.