While most ant species establish a colony independently, some socially parasitic ants build the foundation of their colony by invading other ant (host) colonies and utilizing their labour forces. Many socially parasitic ants disguise their cuticular hydrocarbon (CHC) profile, which is also known as nestmate discrimination pheromones, when invading the host colony. Since the strategy of chemical disguise is widespread in socially parasitic ants, elucidating the mechanism of chemical disguise will promote knowledge on the evolutionary history of social parasitism. However, detailed knowledge is still lacking, as the relevant information has only originated from circumstantial evidence, which was obtained from ecological observations. In this study, we investigated the mechanism of chemical disguise in a new queen of a temporary socially parasitic spiny ant (Polyrhachis lamellidens) by measuring its CHC profile, performing a tracing assay with labelled substances, and analysing gene expression levels. First, after rubbing behaviour was observed against the host workers, the CHC profile in P. lamellidens shifted to pronounced peaks that closely resembling that of the host workers. We also observed a reduction in aggressive behaviours by the host ant against P. lamellidens after rubbing behaviour was performed. In addition, P. lamellidens acquired artificially-applied labelling substances from host workers through their rubbing behaviours, while gene expression profiling showed the expression of CHC synthesis-related genes did not change during this behaviour. These results suggest that P. lamellidens directly obtains host CHCs through rubbing behaviour, and these host CHCs enables P. lamellidens to remain disguised during colony invasion.