Chipmaker Intel has announced that its chief executive, Brian Krzanich, is stepping down with immediate effect because of "a violation of Intel's non-fraternisation policy".
He had been in the post since May 2013.
Intel said an inquiry had revealed that Mr Krzanich had had a consensual relationship with an Intel employee, which was against company rules.
His successor has been named as Robert Swan, currently the company's chief financial officer.
The company said the relevant policy applied to all managers.
"Given the expectation that all employees will respect Intel's values and adhere to the company's code of conduct, the board has accepted Mr Krzanich's resignation."
Mr Krzanich's departure is the latest high-profile exit amid pressure on companies to address issues around gender relations and office conduct.
Intel's shares fell 2% in morning trade as investors reacted to the news.
The company said it would conduct a search to find a permanent successor to Mr Krzanich, who first joined Intel in 1982.
During his tenure, Intel worked to move beyond its reliance on personal computers and expand into areas such as data.
Intel board chairman Andy Bryant said the firm appreciated Mr Krzanich's "many contributions".
"The board believes strongly in Intel's strategy and we are confident in Bob Swan's ability to lead the company as we conduct a robust search for our next CEO," he said.
Intel also told investors it expected a record performance in 2018. In the first three months of the year, the company reported $4.5bn in profit on more than $16bn in revenue.
However, Intel also faced questions this year after it revealed security flaws in its chips months after researchers identified the problem.
Investors and lawmakers also questioned stock sales by Mr Krzanich during months when the firm was aware of the problem but had not disclosed it.
Intel said at the time that the sales were tied to a pre-arranged plan.