Make sure it's Unloaded and at least one of the following:
1) Taken down
2) Enclosed in a case
3) Carried in the trunk of the vehicle
4) Inaccessible to the interior of the vehicle.
So long as it's unloaded and ONE of the above, you're legal to transport it in your vehicle.
Unloaded means that there is no ammunition in the firearm's chamber, or inside any part of the firearm itself. If you're bringing an AR-15, the magazines can be loaded, so long as they are not attached to the firearm. If your gun has a permanently attached mag (like a shotgun with a tube mag) then the magazine must be unloaded as well.
You can keep loaded magazines in the same case as the gun.