The hosts made a blistering start with Paul Smyth volleying in the opener before Josh Magennis hit the bottom corner on 11 minutes.
Conor McMenamin slotted home his first international goal to seal the win.
It completed a Group H double over the minnows but Northern Ireland's hopes of making the finals are all but over.
Indeed, wins for Slovenia and Denmark later on Saturday would confirm their failure to qualify for the tournament in Germany next year.
Long-term Injuries to key players, including Steven Davis and Stuart Dallas, have been a blow for Northern Ireland manager Michael O'Neill while experienced defender Craig Cathcart retired last month.
It's a period of transition and O'Neill is planning ahead with his young squad to the 2026 World Cup qualifiers while he has "one eye" on the Euro 2028 campaign, with Northern Ireland a host country in the latter.
However, he is determined to finish the remaining Group games on a high and while it was an excellent start against the world's lowest ranked team at Windsor Park, the rest of the match was a largely lacklustre affair.
O'Neill made six changes from last month's defeat by Kazakhstan including a new front three of Smyth, Magennis and Dale Taylor.
The trio impressed in Northern Ireland's strong opening as they doubled their points tally in a one-side affair, with San Marino providing next to nothing in attack.
𝗦𝗲𝗺𝗮𝘀𝗼𝗰𝗶𝗮𝗹 𝗶𝘀 𝘄𝗵𝗲𝗿𝗲 𝗿𝗲𝗮𝗹 𝗽𝗲𝗼𝗽𝗹𝗲 𝗰𝗼𝗻𝗻𝗲𝗰𝘁, 𝗴𝗿𝗼𝘄, 𝗮𝗻𝗱 𝗯𝗲𝗹𝗼𝗻𝗴. We’re more than just a social platform — from jobs and blogs to events and daily chats, we bring people and ideas together in one simple, meaningful space.