The Wigan player's partner gave birth 10 days ago, and Northern Ireland manager Michael O'Neill said Grigg "didn't feel being here was right".
"Will asked to not be in the squad due to a family situation, which I'm not going to go into," he added.
Defender Ryan McGivern and midfielder Matthew Lund are included.
Grigg, 25, missed the opening qualifier against the Czech Republic as his partner was expecting to give birth at the time.
"It's a blow for Will - he's been on the scoresheet and I had a good chat with him," added O'Neill at Wednesday's squad announcement.
Uncapped Rochdale midfielder Lund and Shrewsbury Town defender McGivern were late call-ups to the squad for the scoreless draw in Prague because of injuries, and they have another chance to impress O'Neill.
Media playback is not supported on this device
Hartlepool keeper Trevor Carson and Burton Albion defender Tom Flanagan are the other uncapped players in the 24-man squad.
Northern Ireland host minnows San Marino in Belfast on 8 October before facing world champions Germany in Hanover three days later.
Northern Ireland squad:
Goalkeepers: Michael McGovern (Norwich), Alan Mannus (St Johnstone), Trevor Carson (Hartlepool)
Defenders: Gareth McAuley, Jonny Evans (both West Brom), Craig Cathcart (Watford), Conor McLaughlin (Fleetwood), Lee Hodson (Rangers), Michael Smith (Peterborough), Tom Flanagan (Burton), Ryan McGivern (Shrewsbury Town)
Midfielders: Steven Davis (Southampton), Niall McGinn (Aberdeen), Oliver Norwood (Brighton), Corry Evans (Blackburn), Jamie Ward (Nottingham Forest), Shane Ferguson (Millwall), Stuart Dallas (Leeds), Paddy McNair (Sunderland), Matthew Lund (Rochdale)
Forwards: Kyle Lafferty (Norwich), Josh Magennis (Charlton), Conor Washington (QPR), Liam Boyce (Ross County)
Northern Ireland striker Will Grigg will miss next month's World Cup qualifiers against San Marino and Germany for family reasons.