The Sharks received forward Martin Kaut and defenseman Jacob MacDonald.
Nieto, a forward, has 15 points (eight goals, seven assists) in 45 games this season. The 30-year-old has 190 points (81 goals, 109 assists) in 615 regular-season games with the Sharks and Avalanche, and 21 points (eight goals, 13 assists) in 55 Stanley Cup Playoff games.
Nieto was drafted by San Jose in the second round (No. 47) in the 2011 NHL Draft. He was claimed off waivers by Colorado on Jan. 5, 2017, and played four seasons with the Avalanche before he returned to the Sharks as an unrestricted free agent Oct. 13, 2020. Nieto is in the final season of a two-year contract he signed June 21, 2021, and can become an unrestricted free agent.
"He was great for us," Avalanche coach Jared Bednar said of Nieto, who will play against the Anaheim Ducks on Thursday (9 p.m. ET; SN360, ALT, BSW, ESPN+, SN NOW). "Played on our third line, fourth line. Fits our system. He's a skater, worker, responsible checker. It's a good addition to our to our team."
Merkley, a defenseman, had 14 assists in 30 games with San Jose of the American Hockey League this season. The 22-year-old has six points (one goal, five assists) in 39 NHL games, all with the Sharks last season. He was selected by San Jose in the first round (No. 21) of the 2018 NHL Draft.
Kaut had three points (one goal, two assists) in 27 games for the Avalanche this season. He has six points (three goals, three assists) in 47 NHL games since being drafted by Colorado in the first round (No. 16) of the 2018 draft. The 23-year-old had eight points (five goals, three assists) in 10 games for Colorado of the AHL this season.
MacDonald has two assists in 33 games this season. The 29-year-old has 12 points (two goals, 10 assists) in 76 NHL games with the Avalanche and Florida Panthers.
Colorado (26-17-3) has won six in a row and is in third place in the Central Division. San Jose (14-25-10) is seventh in the Pacific Division.