This article is from the alt.usage.english FAQ, by Mark Israel misrael@scripps.edu with numerous contributions by others.
dates from 1708; therefore, NOT son of a "shotgun marriage", which
is only recorded from 1922. Possibly, it means "cradled in the
gun-carriage of a ship"; allegedly, the place traditionally given to
women on board who went into labour -- the only space affording her
any privacy and without blocking a gangway -- was between two guns.
Or it may mean more simply "son of a soldier".
 
Continue to: