Martha Stewart did not disclose the terms of the settlement, but said the deal would not be material to the company.
Macy's sued Martha Stewart and Penney in 2012 after the two announced a partnership in 2011 to open Martha Stewart home shops at hundreds of Penney stores.
Martha Stewart's shares rose as much as 12 percent to more than a year high in regular trading on Thursday. The company's stock has lost about 5 percent of its value since Macy's filed the lawsuit in January 2012.
"The Macy's lawsuit was an overhang to the Martha Stewart shares; the resolution now allows the company to focus on its reorganization in its publishing division, a key catalyst toward higher stock valuations," Noble Financial Capital Markets analyst Michael Kupinski said.
Kupinski estimates revenue of more than $100 million for Martha Stewart from its Penney deal, which will end in 2017.
In December 2011, Martha Stewart struck a deal with Penney under which Stewart would design kitchen, bed and bath products to be sold in shops-within-a-store at larger Penney stores that would anchor a reinvention of the department store by then CEO Ron Johnson.
Penney and Martha Stewart revised their agreement in October, eliminating cookware, bedding and bath products, and other merchandise to which Macy's claims exclusive rights under a 2006 deal. Penney also gave up its 17 percent stake in Stewart's company.
With its broadcast and publishing revenues falling, Martha Stewart has been focusing on boosting its merchandise business.
The company's merchandise revenue grew 7 percent in the quarter ended September 30.
The business accounted for about 42 percent of Martha Stewart's total revenue in the quarter, up from about 30 percent a year earlier.
Macy's also sought to stop Penney from selling any products designed by home improvement doyenne Martha Stewart even if her name doesn't appear on the items or their marketing.
Macy's said in a separate statement that the Thursday settlement did not affect its outstanding claim against Penney.
Martha Stewart's shares closed up 9 percent at $4.57 on the New York Stock Exchange on Thursday. Penney shares closed 3 percent lower at $8.88. Macy's shares ended flat at $53.39.
Reporting by Neha Alawadhi and Aurindom Mukherjee in Bangalore; Editing by Kirti Pandey