In the analysis of high-dimensional spatial data, developing an effective and robust method for variable selection remains a significant challenge. This study addresses this challenge by proposing a generalized \(\ell _{1}\) -penalized spatial quantile autoregressive model with linear constraints on the parameters. The linear constraints incorporate prior information, while the flexibility to choose different penalty functions is achieved by adjusting the weight matrix of the generalized \(\ell _{1}\) -penalty. To resolve the endogeneity problem inherent in the model, we employ the two-stage quantile regression method. Subsequently, we derive the Karush-Kuhn-Tucker (KKT) conditions based on the optimized non-endogeneity problem and propose a solution path algorithm that depends on the KKT conditions and the tuning parameter \(\lambda\) . To facilitate model selection, we construct three information criteria using the derived formula for the degrees of freedom, enabling the selection of the optimal tuning parameter \(\lambda\) . Finally, we validate the effectiveness of our proposed approach through comprehensive numerical experiments and a real-world data analysis.