In this paper, we investigate the cosmic anisotropy from the SN-Q sample, consisting of the Pantheon sample and quasars, by employing the hemisphere comparison (HC) method and the dipole fitting (DF) method. Compared to the Pantheon sample, the new sample has a larger redshift range, a more homogeneous distribution, and a larger sample size. For the HC method, we find that the maximum anisotropy level is ALmax = 0.142 ± 0.026 in the direction (l, b) = (316.08°−129.48+27.41, 4.53°−64.06+26.29). The magnitude of anisotropy is A = (−8.46−5.51+4.34) × 10−4 and the corresponding preferred direction points toward (l, b) = (29.31°−30.54+30.59, 71.40°−9.72+9.79) for the quasar sample from the DF method. The combined SN and quasar sample is consistent with the isotropy hypothesis. The distribution of the dataset might impact the preferred direction from the dipole results. The result is weakly dependent on the redshift from the redshift tomography analysis. There is no evidence of cosmic anisotropy in the SN-Q sample. Though some results obtained from the quasar sample are not consistent with the standard cosmological model, we still do not find any distinct evidence of cosmic anisotropy in the SN-Q sample.