Statistics Canada released the trade data on Tuesday. Canada's trade deficit widened to C$3.34 billion in May from a deficit of C$2.99 billion in April. April's figure was revised down from a deficit of C$2.97 billion.
Analysts had expected a trade deficit of C$2.5 billion.
The increase in deficit was driven by lower exports. Exports dropped 0.6% in May. It was the fifth consecutive monthly fall.
Exports of energy products climbed by 1.3% in May, exports of metal and non-metallic mineral products dropped 5.8%, while exports of metal ores and non-metallic minerals fell 9.2%.
Imports rose 0.2% in May.
Imports of aircraft and other transportation equipment and parts dropped by 12.4% in May, imports of metal and non-metallic mineral products surged 5.0%, imports of energy products increased 2.9%, while imports of consumer goods were up 2.3%.