Peaks Island is unique in Maine in allowing access to the shoreline. (See Beaches post however – most beaches are private). Most of Maine’s Coastline is bordered by private property and cannot be visited or seen.
Back in WWII Peaks was a military installation and the land on the Ocean side, the “Backshore,” was commandeered by the military. The military built a road along the Backshore that remains, and allows residents and visitors to drive, walk or bike along the shoreline.  There are even little pull off spots where you can stop and enjoy the view. The shore road is about 1.7 miles of the full 3.68 mile loop, starting near the 8th Maine and ending at Spar Cove. Along the way there are a number of military relics, including Battery Steele.
So yes, you can drive around but there are other options – walking and bike rentals, or a golf cart tour.  There are at least three reasons to leave your car in Portland.  One – the ferry is expensive; two — there can be long lines to get on the Ferry; three – it will only take a short time to drive and then what? Parking is available in Portland at a number of price points.  See Portland Parking Options