there is nothing guaranteed about the order of the eigenvalues that are produced by eig. And if you do the first method, which is basically
lambda = eig(A)
[v, ~] = eig(A)
the order of eigenvalues may not be the same in each case, meaning that the order of eigenvalues and the order of rows of the eigenvector matrix may not match up. In fact for some examples I tried, they do not match up, which is similar to your experience. This means the first method does not work.
If you would like a vector rather than a diagonal matrix for lambda, there is the option
[v lambda] = eig(A,'vector')
which only calls eig once and so is faster than the first method, in addition to being correct.