The Black Sticks were better in the second half and won their first penalty corner of the game late in the third quarter, but Olivia Merry, who was playing her 250th test, saw her shot miss just wide due to a deflection off a German stick.
Merry had another chance in the fourth quarter but was denied by a strong save from Nathalie Kubalski.
New Zealand had a final push late in the match when Germany saw two players green carded, but weren't able to take advantage as their run at the World Cup came to an end.
Germany will face either England or Argentina in the semifinal.
The Black Sticks will now turn attention to defending their Commonwealth Games title in Birmingham, starting with their opening match against Kenya on 29 July.