Small Aircraft; Low Wing; 1 Eng; Fixed Gear
Flight Crew Private; Flight Crew Instrument
Flight Crew Last 90 Days 38; Flight Crew Total 182; Flight Crew Type 100
Human-Machine Interface; Confusion; Communication Breakdown
ATC Issue All Types; Conflict NMAC
Air Traffic Control Issued Advisory / Alert; Air Traffic Control Issued New Clearance; Flight Crew Requested ATC Assistance / Clarification; Flight Crew Took Evasive Action
Procedure; Human Factors
Approx 5 to 10 miles west of ZZZ; I nearly had a mid-air with another aircraft while under ATC control. I was on an IFR flight plan but needed to return to ZZZ1 due to aircraft issue; and the controller cleared me to descend from 8000 feet to 5500 feet while asking me to turn Left; Heading 270. I continued to descend as the controller directed me next to turn Right; Heading 360. I did and was given a traffic point out to an aircraft flying slightly northwest; closing in on me. I acknowledged I saw the traffic on ADS-B. The controller asked if I could climb to 7;000 feet. After one attempt; I told him unable and watched as the other aircraft's ADS-B track closed in closely on me with the range in our altitudes decreasing. Finally when it appeared the tracks would soon be on top of each other; I turned to the right; then requested a turn to the right. The controller approved; then told the other aircraft to immediately turn left. Before pulling away; it appeared the other aircraft had 300 feet of vertical separation from me.
During the position relief briefing Aircraft X reported aircraft issues and requested to return back to ZZZ.  The relieved controller turned Aircraft X left heading 230 and descended them to 5;000 feet.  The relieved controller finished the briefing and I took over the position.  Aircraft Y was roughly 10 miles south-southwest of Aircraft X and direct ZZZ1 at 7;000 ft.  I descended Aircraft Y to 5;000 feet and switched him to ZZZ.  The 2 targets converged and came within less than 2 miles of each other around 7;000 ft.  I missed the other controller assigning 5;000 to Aircraft Y.  Maybe I should have waited to take the position until the relieved controller finished helping Aircraft X work through their aircraft equipment situation.
TRACON Controller and a pilot reported a NMAC due to the Controller not being aware the Controller they had just relieved had descended another aircraft.