General Electric Co. is looking to exit from the railroad business, one of its oldest, as new Chief Executive John Flannery seeks to streamline the conglomerate.

The Boston-based company is exploring options for the GE Transportation division, according to people familiar with the matter, as a major part of Mr. Flannery’s plans to divest more than $20 billion worth of assets in the next two years.

The...