The improvement gave Canada a $5.8 billion trade surplus, up from $5.2 billion in May, the agency said.
"Imports rose 2 percent to $37.4 billion, the third monthly increase in a row and the eighth in the past 12 months," the report said.
Exports of energy products such as petroleum, coal and natural gas reached $12.8 billion in June, up 11.5 percent from May, and was the eighth consecutive monthly increase, StatsCan said.
While exports of passenger autos remained well below levels reached in 2007, automotive product exports increased 7.7 percent to $5.3 billion in June following three months of decline.
Canada's trade surplus with the United States rose to $9.6 billion, up from $8.1 billion after a 5.3 percent monthly jump in exports worth $32.8 billion, the report said.