The operations, which produce the Chevrolet Kodiak and GMC Topkick, were among the first assets GM put up for sale in 2005 after it started losing money.
GM and Navistar International Corporation struck a tentative deal in 2007, but the pact expired last summer without the sale being completed.
GM has moved quickly since it filed for bankruptcy last week to disclose plans for brands and operations that aren't part of its long-term strategy, and made an official announcement about the truck business earlier today. The carmaker plans a quick sale of its profitable assets by the end of August to a new company.
CEO Fritz Henderson told reporters in Detroit that the truck business had not been successful for years and workers would be deployed to other facilities or offered an attrition program.
GM sold about 20,000 of the vehicles last year, down from roughly 30,000 in 2007, as the US economy sank into a deeper recession.
About 400 hourly and salaried workers are involved in the production of the medium-duty trucks at a GM plant in Flint, Michigan, spokesman Jim Hopson said.
The Flint plant has more than 2100 employees overall and also builds light pickups, which will remain in production at the plant.
Reuters newsagency says that GM had negotiated with multiple potential buyers.
GM has lost a total of US$88 billion since posting its last annual profit in 2004.
The shutdown of the truck business leaves GM actively searching for a buyer of its Saab brand. Last week, GM reached deals to sell its Hummer and Saturn lines, and has held out a slim hope of finding a buyer for Pontiac, scheduled to shut down by the end of next year.