I'm a sucker for non-traditional storytelling so I got a story where the main character dies in opening scene (It's a screenplay, not a novel) and the rest of the story is about his events up until that point. The question is, can an audience handle following a story of a main character that they know, will die in the end? Because I need to make a good opening that will keep people engaged into the story. Otherwise, there isn't really a drive to continue.
The movie http://en.wikipedia.org/wiki/Memento_(film) Memento is a good example of this except the main character isn't killed. I recommend you watch it. The movie itself is a bit confusing, but if you're looking for a start for your screenplay Memento can give you a lot of ideas on how to go about writing it.
I read a book called "Cruddy" by Lynda Barry, where the main character told the reader on page one that she had already committed suicide. I kept reading just to know what led up to that point. So I think the audience will follow the story regardless, but maybe even more so if the character's death isn't the main "hook" of the story, but the interesting circumstances surrounding that death; in the beginning and throughout the story. Just my two cents. I also know of this movie called American Beauty where the main character is also dead by the beginning (never seen it though).
This happens in movies (of course I can't think of any off the top of my head) and things work out just fine. Everyone is going to die anyway it isn't exactly a surprise and the journey is really the story.
It would discourage me from reading the book. I don't need a fully Happily Ever After ending, but I tend to get pretty invested in characters, and reading a book where I knew NOT to get invested in the MC would take away a lot of my reading enjoyment. So I probably wouldn't bother.
If the question is raised about how and why it works. Several films have done this. Sometimes you know it's the main character, and other times it's a mystery that is revealed at the end as being the main character. Examples include Carlito's Way, Citizen Kane, Sunset Boulevard, and my personal favourite, The Million Dollar Hotel.
It can and has worked in the past, but the important thing to remember is that the audience will be viewing the work with the knowledge that the person is going to die, which means you need to write it with that in mind. If it's just a normal old story where the protagonist dies at the end then there really isn't any reason to do so. I'm not really sure how to put it into words, but i guess if you are going to do this then you need a reason for why the story would be improved with the inevitable demise on the table from the beginning, because you are effectively sacrificing audience investment and a surprise for some kind of other theme like mortality or a cautionary tale about the protagonist's actions that lead to their death. If you don't have some kind of other theme to work with then you are essentially just jettisoning both those other elements for nothing.
An alternative I really enjoy is the genre classic to have a protagonist fatally wounded and clearly dying in the first chapter/scene; the rest of the piece is structured with backstory that catches up to the present for the climax in the last chapter/scene. Lots of Noir are built like this. Devil's Backbone took it one step further and had the narrator already dead when the story opens.
Readers are a smart, open-minded bunch. Not everyone is going to like it, but there are plenty who will go along with the idea. Don't underestimate your audience.
As Selbbin pointed out, this has been done in movies before. Break those movies down and see how they made it work. This is an example of dramatic irony.