Ramp metering has been shown to be an efficient and direct measure of alleviating congestion caused by many factors, and many algorithms have been developed and implemented in the real world. Based on the conventional Bottleneck approach, an improved Bottleneck heuristic coordinated metering algorithm is proposed in this paper for managing the ramp meters so as to solve or mitigate the mainline congestion issue caused by factors such as freeway traffic incidents. In this approach, first, the local ramp metering rate is determined through the conventional lookup table approach, and then using density instead of volume as the control variable, a Proportional-Integral (PI) controller is designed to compute the system/coordinated metering rate; finally, the final metering rate is selected using the conventional minimum or maximum rule depending on the comparison between the target and current traffic densities. Taking the ramp system of Nanjing-Hangzhou Freeway as an example, the proposed improved Bottleneck algorithm is implemented in a simulated environment, and the results confirmed the effectiveness of the improved Bottleneck algorithm.