This paper describes a selection of a merging point and a trajectory generation method for a merging maneuver of vehicles on a motor way which is possible to be used in a centralized merging control system as well as in a stand-alone merging control system. The merging problem is formulated into an optimization problem using receding horizon control framework. An appropriate path to merge is designed for the merging vehicle, which is modified according to the motion of the main lane vehicles. Appropriate constraints are set for the vehicles so that the vehicle can move smoothly in the specified range. The possibility of the method to be used in a centralized motion control system for vehicles during merging and a standalone motion control system for the merging vehicle is examined by computer simulation.