Praise be to Allah.
The scholars (may Allah have mercy on them) differed concerning how the profit is to be shared: should it be commensurate with each partner’s contribution to the capital, as in the case of loss, or should it be according to what is agreed upon between the partners, whether it is great or small? There are two opinions:
1.The view of the Hanafis and Hanbalis: that the profit should be shared according to what the partners stipulated and agreed upon, so long as the profit is clearly defined.
2.The view of the Maalikis and Shaafa‘is: that the profit should be shared commensurate with each partner’s contribution to the capital.
Ibn Qudaamah (may Allah have mercy on him) said: It is permissible to share in profit according to the share contributed by each partner, and it is permissible to share it equally, even if their contributions differed, and one may take more than the other even if their contributions were equal. This was stated by Abu Haneefah.
Maalik and ash-Shaafa‘i said: One of the conditions of it being valid is that profits and loss must be commensurate with the proportion of capital contributed, because profit in this partnership is connected to the capital.
In our view, work (done by one of the partners) deserves a portion of the profit, so it is permissible for them to have different levels of profit if one of them is putting work into the business, as when different people use the capital of one man for business (mudaarabah). That is because one of them may have more experience in business than the other, and may be more able to achieve results. So it is permissible for him to stipulate an additional share of the profits in return for his work, as a proportion of the profit may be stipulated in return for the work of the one who is running the business venture.
End quote from al-Mughni (5/19).
Based on that, the profit may be divided in the following manner:
The one who contributed 2 million is entitled to two thirds and the one who contributed 1 million is entitled to one third. This is according to the Maaliki and Shaafa‘i madhhabs, and is a fair division that is valid according to scholarly consensus.
If the two partners agreed not to divide the profit according to the proportion of the capital contributed by each, and they want - for example - to divide it between them in two equal halves, so that the one who contributed 2 million takes half of the profit and the one who contributed 1 million takes the other half, and they both agree to that, then this is also permissible according to the Hanafi and Hanbali madhhabs, because it is their right to decide, and the one who contributed the greater part of the capital may yield a portion of his profit to his partner, voluntarily.
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) also stated that the latter way of sharing the profit between two partners is valid. See: ash-Sharh al-Mumti‘, 9/403
And Allah knows best.