No one really knows the answer because it has never happened and been litigated. However, the majority view is that a president can pardon himself (assuming he does so prior to impeachment). Art. II Sec. 2 of the Constitution states, in part, that the president "shall have Power to grant Reprieves and Pardons for Offences against the United States, except in Cases of Impeachment." The purpose of this clause was to insure the separation of powers by preventing the courts from using the law as a legal blackmail against the president.

The argument that the president could murder someone and then pardon himself is rather a non-sequitur considering that the vice president (or anyone) could kill anyone for the president and then the president could pardon him or her.

Note: There is a minority view that the president cannot pardon himself.