The move marks an effort by United to win travelers in the highly competitive transcontinental market, where rivals American Airlines, Delta Air Lines and JetBlue Airways have invested heavily in renovating aircraft cabins and airport terminals.

Beginning Oct. 25 of this year, the airline will transfer its only flights from JFK, which serve Los Angeles and San Francisco on Boeing 757 aircraft, to Newark, its hub that has hundreds of connecting flights.

Shares of the airline's parent, United Continental Holdings , were down more than 2 percent after the news.

United Airlines said Tuesday it plans to end service in October at New York's John F. Kennedy International Airport, where it failed to profit over seven years because it offered few connections to other cities, and add flights at its Newark, New Jersey, hub. (Tweet This)

Delta plans to acquire United's slots at JFK. In turn, United plans to acquire Delta's slots at Newark. Both transactions have yet to receive regulatory approval.

According to Delta spokesman Anthony Black, United will not acquire all of Delta's slots at Newark. He told CNBC that there would be a "net neutral" change in the number of flights it operates from that airport as a result of the deal.

Shares of Delta closed down about 0.3 percent Tuesday.

The changes may also cut costs. United's chief revenue officer, Jim Compton, said the airline expects to reduce staffing as part of the consolidation, although it will work with unions to find workers alternative jobs. The airline currently employs about 200 airport operations workers and about 70 technicians at JFK, he said.

United has criticized the Port Authority of New York and New Jersey for charging flight fees at Newark that it thinks are too high. Compton said the airline will continue to advocate that "costs are equitable and used appropriately in the area."

Read MoreAirline woes shouldn't trouble the market



The airline will maintain its service at New York's LaGuardia Airport.

JFK is operated by the Port Authority. It is one of the largest airports in the country with six operating terminals and more than 125 aircraft gates that serve them. In 2013, JFK surpassed 50 million annual passengers for the first time in its history, according to the Port Authority.

According to a release, United Airlines, along with United Express, operates an average of nearly 5,000 flights a day to 373 airports across six continents.

—CNBC's Reem Nasr contributed to this report.