It is known that the order of a finite quandle annihilates its reduced quandle homology and the torsion subgroup of its rack homology if the quandle is quasigroup. However, this does not hold in general if a quandle is connected. In this paper, we prove that under a certain condition, the reduced quandle homology and the torsion subgroup of the rack homology of a connected quandle are annihilated by the order of the inner automorphism group of the quandle.