The wind power ramp is a large and fast variation of wind power in a short period of time and poses a serious threat to the safe, stable, and economic operation of the power system. Forecasting the wind power ramp has great significance for mitigating these challenges. Using similar data as training samples is beneficial to the model accuracy. This article presents a method for forecasting a wind power ramp based on deep metric learning. Different from previous work, the proposed model takes numerical weather prediction sequences as model input and output to evaluate the similarity between them. A fully connected neural network with metric learning function is established in order to obtain a training sequence similar to the actual situations. A case study is conducted based on operational data of a Chinese wind farm. Results show that proposed model can extract the actual power ramp characteristics and thus improve the forecasting accuracy.