Nilstorp, a 29-year-old veteran of the Swedish Elite League, notched his first NHL win in his fourth North American start as Dallas snapped a two-game losing streak.
Antti Niemi coughed up three goals on 28 shots for the Sharks, who completed a 1-4-1 road trip.
Patrick Marleau got San Jose's only score.
Nativity scenes to be moved at Guantanamo after troops' protest
WATCH: Anchor has laugh attack during 'alligator for beer' report