Homogeneity of appearance attributes of bell peppers is essential for consumers and food industries. This research aimed to develop an in-line sorting system using a deep convolutional neural network (DCNN) which is considered the state-of-the-art in the field of machine vision-based classifications, for grading bell peppers into five classes. According to export standards, the crop should be graded based on maturity stage and size. For that, the fully connected layer in the ResNet50 architecture of DCNN was replaced with a developed classifier block, including a global average-pooling layer, dense layers, batch normalization, and dropout layer. The developed model was trained and evaluated through the five-fold cross-validation method. The required processing time to classify each sample in the proposed model was estimated as 4 ms which is fast enough for real-time applications. Accordingly, the DCNN model was integrated with a machine vision-based designed sorting machine. Then, the developed system was evaluated in the in-line phase. The performance parameters in the in-line phase include accuracy, precision, sensitivity, specificity, F1-score, and overall accuracies were 98.7%, 97%, 96.9%, 99%, 96.9%, and 96.9%, respectively. The total rate of sorting the bell pepper was also measured as approximately 3000 sample/h with one sorting line. The proposed sorting system demonstrates a very good capability that allows it to be used in industrial applications.