The electronic transport properties of a graphene nanoribbon (GNR) are known to be sensitive to its width, edges and defects. We investigate the electronic transport properties of a graphene nanoribbon heterojunction constructed by fusing a zigzag and an armchair graphene nanoribbon (zGNR/aGNR) side by side. First principles results reveal that the heterojunction can be either metallic or semiconducting, depending on the width of the nanoribbons. Intrinsic rectification behaviors have been observed, which are largely sensitive to the connection length between the zGNR and aGNR. The microscopic origins of the rectification behavior have been revealed. We find that the carrier type can alter from electrons to holes with the bias voltage changing from negative to positive; the asymmetrical transmission spectra of electrons and holes induced by the interface defects directly results in the rectification behavior. The results suggest that any methods which can enhance the asymmetry of the transmission spectra between holes and electrons could be used to improve the rectification behavior in the zGNR/aGNR heterojunction. Our findings could be useful for designing graphene based electronic devices.