Nepal Oil Corp (NOC) and Petro China signed the pact in Beijing following an unofficial trade and fuel embargo from India against Nepal for the past one month, officials here said.
The MoU's content was not immediately known. It is not clear how much fuel Nepal will import from China right away.
With the de facto Indian embargo, Nepal has faced serious shortage of fuel, medicines and other essential commodities.
The Wednesday MoU paves the way for Nepal to import fuel from China, Nepal's ambassador to China Mahesh Maskey told the Nepali media after the agreement was signed.
A Nepali team negotiated with Chinese officials on Tuesday and Wednesday.
Jhang Tong of Petro China and Gopal Bahadur Khadka of Nepal Oil Corp signed the deal.
Nepal buys over $1.3 billion of gasoline from Indian Oil Corp annually.
Nepalese and Indian officials had only two months back signed a petroleum pipeline deal.
Nepal has not imported any gasoline from China in the past. It has been buying fuel only from IOC.
Besides commercial import of fuel from China, Beijing has also pledged to provide Nepal with 1.3 million liters of gasoline to cope with increasing fuel crisis in Nepal.
This fuel will be provided as a grant by China.
The ongoing fuel shortage has forced the closure of thousands of schools and taken off thousands public and private vehicles off the roads, hitting Nepal's economy hard.