Motivation is when you want to do something and achieve it. For that you need a plan. An objective or a target to work toward.
Many of the things which motivates me are competition, reward and my future. Now you want to get A's in your studies so think of it that way, if you fail your future might be ruined, your parents will not be pleased, your friends will be higher at you in studies, you will be ashamed to tell your grades to people and you will not be satisfied yourself because you did not work hard enough thus all what you will feel is regret and loss.
Always teach yourself to love the thing you are doing. Make it your belief that the thing you are doing is interesting not boring. Always telling yourself that this thing is boring, even if it is not, will be your belief so sometimes we create our own believes.
Sit there, write down a plan for everyday, create your own goals and try following them. Even if you don't follow them at first just never give up. Success won't come from the first try.
You will lose motivation when you have lack of confidence, direction and purpose.
Now since you are a Muslim, just know that you won't achieve any of this without the rememberence of Allah because He is always watching you and what you do. Be loyal to your work and do your best. Your job is not the problem you should worry about and not the results. What matters is that you do your best, push yourself to the limit and leave the rest on God. Pray for success and have faith in Allah. =] Good Luck.