WASHINGTON—White House Chief of Staff John Kelly said he had accepted President Trump’s request to stay in his job through the 2020 election, according to officials, as tensions between the two men have eased in recent months.

Mr. Kelly had been widely expected to leave the White House this summer. He told staff his decision to stay put on Monday, which marked his first anniversary in the role.

The...