Xi will meet with North Korean leader Kim Jong Un during the visit on Thursday and Friday, Chinese state broadcaster CCTV said. It said the trip will be the first by a Chinese president in 14 years.
North Korea's official Korean Central News Agency also announced the visit, but provided no further details.
The visit coincides with the 70th anniversary of the establishment of diplomatic relations between China and North Korea, CCTV said. The broadcaster added the leaders will exchange views on the situation on the Korean Peninsula.
The visit comes as negotiations between the U.S. and North Korea appear to have reached an impasse.
A summit in Vietnam in February between Kim and President Donald Trump failed after the U.S. rejected North Korea's request for extensive relief from U.N. sanctions in exchange for dismantling its main nuclear complex, a partial disarmament step. Since the summit's breakdown, no major contacts between the U.S. and North Korea have been announced.
Kim traveled to the Russian Far East in April for a meeting with Russian President Vladimir Putin. The move was viewed as aimed at strengthening his leverage over Washington and persuading Moscow to loosen its implementation of the international sanctions against North Korea.
Last month, North Korea fired short-range missiles and other weapons into the sea in an apparent effort to apply pressure on the U.S.
KCNA reported in April that Kim said he will give the U.S. "till the end of the year" to reach out with further proposals.
Since taking office in 2012, Xi has met with Kim four times in China. The meetings were timed in proximity to Kim's meetings with Trump and South Korean President Moon Jae-in, highlighting Beijing's role as a key player in the nuclear standoff. Beijing has long advocated a "dual suspension" approach in which North Korea would halt its nuclear and missile activities while the U.S. and South Korea cease large-scale joint military exercises.
Chinese political scholar Zhang Lifan said the aim of Xi's trip is likely not to make any breakthroughs, but rather to remind other countries of China's unique position.
Zhang said Beijing may be seeking to gain leverage ahead of a G-20 summit in Japan later this month and reassert itself as a global player amid growing concerns over its economy.
"North Korea is a card for China to play," Zhang said. "China may want to show off its relationship with North Korea and demonstrate its importance to U.S.-North Korean relations."
South Korea's presidential office said it hopes Xi's visit to North Korea will contribute to a swift resumption of negotiations to resolve the nuclear standoff. It said it has been engaging in discussions with Beijing over the possibility of a visit by Xi, which it views as a positive development in efforts to peacefully resolve the peninsula's issues.
Associated Press writers Hyung-jin Kim and Kim Tong-hyung in Seoul, South Korea, contributed to this report.
Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.