This paper presents a search-based global motion planning method, called the two-phase A*, with an adaptive heuristic weight. This method is suitable for planning a global path in real time for a car-like vehicle in both indoor and outdoor environments. In each planning cycle, the method first estimates a proper heuristic weight based on the hardness of the planning query. Then, it finds a nearly optimal path subject to the non-holonomic constraints using an improved A* with a weighted heuristic function. By estimating the heuristic weight dynamically, the two-phase A* is able to adjust the optimality level of its path based on the hardness of the planning query. Therefore, the two-phase A* sacrifices little planning optimality, and its computation time is acceptable in most situations. The two-phase A* has been implemented and tested in the simulations and real-world experiments over various task environments. The results show that the two-phase A* can generate a nearly optimal global path dynamically, which satisfies the non-holonomic constraints of a car-like vehicle and reduces the total navigation time.