Saab 2000
Flight Crew Air Transport Pilot (ATP); Flight Crew Multiengine; Flight Crew Instrument
Flight Crew Last 90 Days 25; Flight Crew Total 7500; Flight Crew Type 2600
Distraction; Situational Awareness
Aircraft Equipment Problem Less Severe; Deviation - Altitude Excursion From Assigned Altitude; Deviation - Track / Heading All Types; Deviation / Discrepancy - Procedural Clearance; Inflight Event / Encounter CFTT / CFIT
Flight Crew Returned To Clearance; Flight Crew Took Evasive Action
Human Factors
The aircraft was on autopilot and we were in a descent to 3;000 feet.  We were given direct to GLISS.  The aircraft made a large turn to the West (approximately 20 degrees past the heading that would take us to GLISS) rather than heading for the fix.  I was unsure what the autopilot was doing; so I disengaged it and started a turn back to the North to proceed towards GLISS. Upon disengaging the autopilot; the aircraft was in the level off phase at 3;000 feet.  As I was starting the correction for the turn; the descent continued to 2;700 feet before I realized we were still descending. I stopped the descent and started to climb back to 3;000 feet.  At this time; we also received an 'Obstacle Ahead' GPWS warning for a tower located near the airport.  While we were receiving the 'Obstacle Ahead' warning; ATC advised us that our altitude was low.We continued the turn back towards GLISS and the climb back to 3;000 feet.I believe the turn to the West that the auto pilot did put us on a course to head towards the tower; rather than off to the right of it.  In trying to figure out what was going on with the autopilot; I missed the level off altitude of 3;000 feet.
SB-20 Captain reported receiving a GPWS obstacle warning while deviating from cleared track and altitude. Troubleshooting an autopilot issue was a factor in this incident.