We study the optimal control problem for a weighted mean-field system. A new feature of is that coefficients depend on state process as well its measure and variable. By applying variational technique, we establish stochastic maximum principle. Also, sufficient condition optimality. As an application, investigate premium policy insurance firm asset–liability management problem.