The move is an attempt to shift its focus to higher-margin businesses like cloud computing and artificial intelligence.
A new company focusing on legacy IT infrastructure will be named and spun off next year.
IBM shares closed nearly 6% higher after the announcement.
It marks the latest shift by the world's first big computing firm to diversify away from its traditional businesses.
“We divested networking back in the 1990s, we divested PCs back in the 2000s, we divested semiconductors about five years ago because all of them didn’t necessarily play into the integrated value proposition,” Chief Executive Arvind Krishna said.