The present invention provides a process for the preparation of 7-(4-(4-(2,3-dichlorophenyl)piperazin-1-yl)butoxy)quinolin-2(1H)-one, compound of formula II or pharmaceutical acceptable salts thereof, which may present in aripiprazole as an impurity. Formula II