As the transaction subject of contract farming, agricultural products are featured with a long production cycle and a short sales cycle, just like other perishable commodities. In the process of executing a contract, both the company and the farmer are running the risk of great uncertainty. This paper studies the coordination of agricultural supply chain in terms of the uncertainty of agricultural output and market demand. First of all, the random output volatility factor and the market demand volatility factor as two random variables are used to represent the uncertainty of the agricultural output and market demand, and revenue functions are set up, respectively, for the company and the farmer with the objective of maximizing expected returns. The theoretical derivation of these revenue functions proves that there is an optimal targeted yield in a centralized decision-making supply chain system and a single optimal solution that maximizes farmers’ revenue can be obtained in a decentralized one, but the centralized decision-making supply chain is superior to the decentralized and uncoordinated counterpart for overall benefit. Secondly, a revenue-sharing-plus-margin contract mechanism is proposed to coordinate income distribution between the two parties of the supply chain through the revenue-sharing coefficient and margin. Thirdly, calculation examples are given and solved by MATLAB based on the assumption that both the agricultural output volatility factor and the market demand volatility factor are uniformly distributed, and the theory and result are then verified consistently. Finally, the numerical analysis of the coordination mechanism of the revenue-sharing coefficient and the margin on both sides of the supply chain provides an optimal value range so that Pareto improvement on the company’s and the farmers’ income can be achieved.