The Danish ministry said the level of traded electricity had been limited due to bottlenecks on the German grid.
In 2016, only 11% of trading capacity between Jutland, the Danish peninsula bordering the German state of Schleswig Holstein, and Germany was available to market, according to the Danish ministry.
"Commercial limitation means that although the Nordic electricity producers in periods can produce electricity cheaper than their German competitors, they can not access to sell power in the German market," the Danish ministry said.
With this agreement, which takes effect from 1 December 2017, the minimum available capacity that can be traded will increase to 400MW/hour, from an average of 200MW/hour in 2016.
The capacity continues to increase in intervals to 1.1GW/hour by 2020, after which the contract expires.
Each country's transmission operators — Energinet.dk in Denmark, and Tennet in Germany — will be responsible for implementing the agreement.
"The government supports a fully integrated and cross-border market for electricity in Europe. A single market for electricity is a prerequisite to integrate more renewable energy into the energy system," said Danish energy minister Lars Lilleholt.
"With this temporary agreement, we are not fully opening capacity, but we reach an important step. The problems of internal bottlenecks in Germany are very complex, and it would be unrealistic to solve the problems from one day to the other," Lilleholt said.