Narrative:

Before departure from ZZZ; we picked up a clearance and got a hold for release. We contacted center when we were number one for takeoff runway xx. Center told us we were released; release time was XA40; void if not off by XA50; contact them no later than XA55 if not off. At XA42 we lifted off runway xx and heard a plane in a panicking voice saying; aircraft X; center says 'don't take off don't take off.' we immediately contacted center and he told us to make an immediate turn to 360; we were passing through 3;000 and he told us to descend to 3000 ft. We could see a plane closing in on the TCAS and banked about 45 degrees and pitched the nose down to start descent to 3;000. At that point we exceeded the flap speed. I immediately pulled flaps up. We leveled at 3;000 on a 360 degree heading. I asked the controller where that traffic came from and he said; 'that was my fault. I was thinking you guys were coming off of ZZZ1.' as we were in the descending turn taking evasive action to avoid the traffic; I didn't get flaps up in time and we had a flap overspeed. Aircraft yelling don't take off when we were on climb out. Controller mistook our departure airport and released us for departure while there was traffic conflicting with our departure path and clearance. Steep descending turn to avoid traffic. Don't have any suggestions at this time. It was an honest mistake and glad it wasn't worse than it could have been.

Google
 

Original NASA ASRS Text

Title: Light Transport aircraft flight crew reported departing from an uncontrolled airport that resulted in an NMAC due to ATC believing the flight had departed from a different airport.

Narrative: Before departure from ZZZ; we picked up a clearance and got a hold for release. We contacted Center when we were number one for takeoff Runway XX. Center told us we were released; release time was XA40; void if not off by XA50; contact them no later than XA55 if not off. At XA42 we lifted off Runway XX and heard a plane in a panicking voice saying; Aircraft X; Center says 'DON'T TAKE OFF DON'T TAKE OFF.' We immediately contacted Center and he told us to make an immediate turn to 360; we were passing through 3;000 and he told us to descend to 3000 ft. We could see a plane closing in on the TCAS and banked about 45 degrees and pitched the nose down to start descent to 3;000. At that point we exceeded the flap speed. I immediately pulled flaps up. We leveled at 3;000 on a 360 degree heading. I asked the Controller where that traffic came from and he said; 'That was my fault. I was thinking you guys were coming off of ZZZ1.' As we were in the descending turn taking evasive action to avoid the traffic; I didn't get flaps up in time and we had a Flap Overspeed. Aircraft yelling don't take off when we were on climb out. Controller mistook our departure airport and released us for departure while there was traffic conflicting with our departure path and clearance. Steep descending turn to avoid traffic. Don't have any suggestions at this time. It was an honest mistake and glad it wasn't worse than it could have been.

Data retrieved from NASA's ASRS site and automatically converted to unabbreviated mixed upper/lowercase text. This report is for informational purposes with no guarantee of accuracy. See NASA's ASRS site for official report.