I am studying in Germany but had to make an emergency trip to my home country. My visa will expire 3 days after my return to Germany. There are no early appointments available at the embassy. Can I apply for a short-term Schengen visa to the Netherlands and then go to Germany? The Schengen visa will help as I can apply for a temporary residence permit during this time.
Article 18 of the Schengen Visa Code requires the Netherlands to refuse to process your application unless you are planning a visit to the Schengen area in which the Netherlands is your main destination, as defined in Article 5, so this plan is unlikely to succeed.
It's probably better to plan to make your temporary residence permit application during the three days after your return to Germany, but questions about that belong on Expatriates.