To counteract community detection algorithms and thereby protect node privacy, community hiding methods have garnered more and more attention. However, current mainstream community hiding algorithms only focus on the network’s topological structure, neglecting the influence of node attributes on community structure, leading to bad performance on attribute networks. In response to these issues, an Attribute network Community hiding method based on Genetic algorithm (ACG) was proposed. In this method, network topological structure and node attributes were integrated, with the core of finding the optimal edge hiding strategy by optimizing a fitness function. In ACG, while minimizing hiding costs, maximizing modularity and attribute similarity was adopted as dual metric to select and perturb the set of edges with the greatest impact on community structure, thereby attacking community detection algorithms for attribute networks effectively. Experimental results demonstrate that without changing the total number of edges and attribute information, the proposed method counters mainstream attribute community detection methods effectively; compared with other community hiding methods, ACG has advantages in counteracting classic community detection algorithms on five attribute networks.