HIV-related stigma continues to be a prominent barrier to testing, treatment and care. However, few studies have investigated changes in stigma over time and the factors contributing to these changes, and there is no evidence of the impact of HIV testing and counselling on stigma. This study was nested within a pair-matched cluster-randomized trial on the acceptance of home-based voluntary HIV counselling and testing conducted in a rural district in Zambia between 2009 and 2011, and investigated changes in stigma over time and the impact of HIV testing and counselling on stigma. Data from a baseline survey (n = 1500) and a follow-up survey (n = 1107) were used to evaluate changes in stigma. There was an overall reduction of seven per cent in stigma from baseline to follow-up. This was mainly due to a reduction in individual stigmatizing attitudes but not in perceived stigma. The reduction did not differ between the trial arms (β = −0.22, p = 0.423). Being tested for HIV was associated with a reduction in stigma (β = −0.57, p = 0.030), and there was a trend towards home-based Voluntary Counselling and Testing having a larger impact on stigma than other testing approaches (β = −0.78, p = 0.080 vs. β = −0.37, p = 0.551), possibly explained by a strong focus on counselling and the safe environment of the home. The reduction observed in both arms may give reason to be optimistic as it may have consequences for disclosure, treatment access and adherence. Yet, the change in stigma may have been affected by social desirability bias, as extensive community mobilization was carried out in both arms. The study underscores the challenges in measuring and monitoring HIV-related stigma. Adjustment for social desirability bias and inclusion of qualitative methods are recommended for further studies on the impact of HIV testing on stigma.