Texas Instruments Inc. Chief Executive Brian Crutcher resigned after spending less than two months in the role, exiting over what the chip maker said were code-of-conduct violations.

TI on Tuesday said “the violations are related to personal behavior that is not consistent with our ethics and core values, but not related to company strategy, operations or financial reporting.”

A TI spokeswoman declined to comment on the violations beyond the company’s statement. She said TI’s board learned of the violations last week and immediately looked into the matter. Mr. Crutcher, she said, submitted his resignation Tuesday.

Brian Crutcher Photo: Texas Instruments

Mr. Crutcher, who also resigned from TI’s board, couldn’t immediately be reached for comment Tuesday afternoon.

The resignation, which comes amid intensified scrutiny of executive behavior across the business world, makes Mr. Crutcher the third chip-industry boss to leave for conduct reasons in the past month. Brian Krzanich resigned as CEO of Intel Corp. on June 21 after violating company policy by having a relationship with an employee, Intel said.

Rambus Inc., which licenses technology used in semiconductors and software, fired its CEO, Ron Black, on June 28, after what the board said was conduct that “fell short of the company’s standards” and was unrelated to its business.

Mr. Crutcher was promoted to CEO and president of TI on June 1, succeeding Rich Templeton.

Mr. Templeton, who had stayed on as chairman, is returning to the president and chief executive roles on an “ongoing, indefinite basis.” He will also retain the chairman title, the company said.

In a video message sent to employees Tuesday and posted on TI’s website, Mr. Templeton said the company has “no tolerance for violations of our code of conduct.” He added: “I am back in, deeply immersed and very excited about the opportunity in front of us today and the opportunity to be your CEO.”

Mr. Templeton also said in an email to employees Tuesday he didn’t plan to make any changes to TI’s organizational structure.

At the end of May, just before he took over as CEO, Mr. Crutcher was asked at an industry conference what he would bring to the company. “I gave you one word, it would probably be consistency,” he said, according to a transcript. “We’re not changing the seat right now because there’s some huge problem.”

Mr. Crutcher, whose biography has been taken down from the company’s website, joined TI in 1996. He was promoted to executive vice president and chief operating officer in January 2017 and elected to the board in July of that year.

TI shares fell 1.4% to $113.20 in after-hours trading. Shares had gained 11% so far this year.

TI was founded in 1930 as an oil and gas company, taking its current name in the 1950s as it shifted into the burgeoning semiconductor business. Famous decades ago for its calculators, TI later became a major producer of communications chips. In recent years it has focused on analog chips that electronic devices use to process physical signals like sound and temperature, and embedded applications that include those used in cars and industrial equipment.

TI remains one of the world’s biggest chip companies, with revenue last year of about $15 billion and a market value of more than $110 billion.

TI on Tuesday also reported second-quarter revenue of $4.02 billion, up nearly 9% from a year earlier. The company said it had profit of $1.40 a share, including a tax benefit of 3 cents a share that wasn’t included in its original guidance.

Analysts expected TI to report $1.35 a share in profit, according to S&P Global Market Intelligence. The company is scheduled to report full quarterly results July 24.

Write to Maria Armental at maria.armental@wsj.com and Eliot Brown at eliot.brown@wsj.com