What is the flaw of this proof (largest integer)?
In fact, you have given a valid proof of a true theorem.
Theorem. If $n$ is the largest positive integer, then $n=1$.
You would start a proof of this theorem exactly the way you did start: "Let $n$ be the largest positive integer." So your proof is perfectly valid. But it doesn't prove that $1$ is the largest positive integer; that would be a different theorem: There exists a largest positive integer, and it is equal to $1$. To prove that stronger theorem, you'd first have to prove existence, which of course you cannot do.
The theorem statement you did prove is an example of a mathematical statement that is "vacuously true." This means it is true because its hypothesis is always false. If you look at the truth table for the implication $P\implies Q$, you'll see that in all cases in which $P$ is false, the implication is true. So you proved a true (but entirely uninteresting) result!
There is no flaw in the argument. You have proved the statement
If the largest positive integer $n$ exists, then $n=1$.
This statement is true, indeed you have proved it. Note that also the statement
If the largest positive integer $n$ exists, then $n=42$
is true, because there's no largest positive integer.
This seems like a proof by contradiction, i.e. in order to prove that there is no largest integer, make the assumption that there IS one and poke a hole in it. Since the flawless logic indicates that the largest integer would be 1, and we can clearly indicate that it is not, you have a contradiction and a proof that there is no single largest integer.