Narrative:

Weather deteriorated while visiting in ZZZ; airport went IFR; [but] VMC conditions still existed. We had to file to get out. The freezing levels were at 7;000 feet. I filled for 6;000 feet. When we received the clearance; I accepted as long as we could stay low and cancel over the desert. ZZZ [approach] would not allow this stating that we knew the conditions. We were assigned the climb up to 11;000 feet.; my intentions were to cancel over [the] desert and continue VFR.I requested lower due to the OAT and was denied the request. I then asked to divert for [a] VOR. [Controller] gave me vectors and my mag compass was off by 15 degrees. ZZZ [approach] then [advised for me] and gave me no gyro back to my new choice. The icing started to melt off around 4;000 feet and I was able to land VFR and wait out the clouds.

Google
 

Original NASA ASRS Text

Title: GA pilot reported taking off in a C172 into known icing. Ice built rapidly and forced a diversion to the nearest airport.

Narrative: Weather deteriorated while visiting in ZZZ; airport went IFR; [but] VMC conditions still existed. We had to file to get out. The freezing levels were at 7;000 feet. I filled for 6;000 feet. When we received the clearance; I accepted as long as we could stay low and cancel over the desert. ZZZ [Approach] would not allow this stating that we knew the conditions. We were assigned the climb up to 11;000 feet.; my intentions were to cancel over [the] desert and continue VFR.I requested lower due to the OAT and was denied the request. I then asked to divert for [a] VOR. [Controller] gave me vectors and my mag compass was off by 15 degrees. ZZZ [Approach] then [advised for me] and gave me no gyro back to my new choice. The icing started to melt off around 4;000 feet and I was able to land VFR and wait out the clouds.

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.