I am planning to stay in Amsterdam for around 2 months to visit my brother. Is there any restriction to do non-paid volunteer work in Amsterdam. I hold a Nicaragua passport.
Yes. You are allowed to do vrijwilligerswerk, as it is called in Dutch, if you have a legal permit to be there. One exception is when you are awaiting a decision as to your status. This site contains Dutch-language information on the topic. Google Translate may be your friend.
However, you might need to be careful with insurances: See here.
I don't know if you can get a visa through doing the volunteer labour, though.
I would recommend to contact the organisation where you want to do volunteer labour for practical issues.