Here are several ways I keep myself motivated to write novel-length fiction, in no particular order:
1. Have a dedicated location where all you do is write. You do not do anything else in the location. And if you find that you have writer's block, you leave the location until the block passes. You have to train your brain that the location is for writing, so when you go there your brain says "it's time to write!"
2. Have a music playlist that motivates you to write. I have a different playlist for both genres I write (YA fantasy and scifi).
3. Keep a great book that you would love to have written, or would like to emulate, in your writing location. Look at it often. Dream of achieving that level of success and realize that that author was once exactly where you are.
4. Keep a terrible book that you can't believe got pubilshed in your writing location. Look at it often. Realize that if that piece of rubbish could get published, you darn well know that you can!
5. Outline your novel. If you know where your chapter is going, it's so much easier to write the actual paragraphs.
6. Do not try to make the first draft perfect. This is a big one for me. If I try to make the first draft perfect, I won't ever get past chapter 5. I have to hammer through the whole story with minimal revisions until I finish the first draft. This usually results in my first draft being pretty bad. Don't sweat it. It'll get up to snuff by the seventh revision.
7. Don't get mired in difficult passages. If you have an outline, you can skip over difficult parts of the story and come back to them after you finish the first draft. It's so liberating to know that I don't have to spend days trying to resolve some dialog or minor plot point right now. I can skip past it and come back to it. If it's taking you too long for to get past a problem, ignore it and move on.
Does anyone else have any good advice to stay motivated and keep writing? If so, add it to the comments.