My PI left academia 3 years ago, leaving me as an exchange-PhD student behind. I made 1/4 of the work in his lab. when he left I had to make an agreement with the institute to stay here and finish my work. They agreed to give me the salary and visa for one more year. I had to find my own funding, and worked at a bench in abandoned lab using their old equipment without guidance. Yet I got some great feedback from other PIs on campus. Last year I stopped getting salary from the institution and visa expired so I'm here now on turist visa to finish the project. I just finished writing the paper, which is required for me to graduate but I'm a bit confused about who should I put as first, last, and corresponding author? Since my former PI has nothing to do with our institute anymore, he did initiate the project. However he left me behind without guidance, funds, salary, visa, nor tried to find another lab/PI where I could finish my work. I know he will not help me with the submission process nor with the post-review work. Therefore I wonder if putting him on the paper will only allow him to create more problems while I really want to graduate asap, yet I need to have a paper accepted in order to do so. What's your recommendation?
Ideally, he should be on the paper as author, if and only if his intellectual contributions appear in it. But practice differs in some fields and you likely need to adhere to the norms of the field, even if not ideal. If he is not an author, you need to acknowledge him for starting the project (at least). And "starting the project" may or may not mean an intellectual contribution to the paper.
In some fields, a PI is always included. In others it depends on their actual contribution to the paper as opposed to the project overall.
However, practice also differs in author order. In some fields (pure math and theoretical CS) it is usually alphabetical. In others the primary author is listed first. But in others the primary author is listed last. It doesn't make a lot of sense outside the field.
"Corresponding author" can mean various things. I normally take it to be just a bureaucratic function, not an honorary one. Who is the best person to respond to queries about the paper? That is likely yourself in this case.
You don't mention whether there are others involved, complicating the issue.
Note also, that permission to publish is required of all authors and even some who are acknowledged by name. Reputable publishers will insist on that.