WASHINGTON—Facebook has agreed to pay up to $14.25 million to settle civil claims by the federal government that the social media company discriminated against American workers and violated federal recruitment rules, officials said on Tuesday. The two related settlements were announced by the Justice Department and Labor Department and confirmed by Facebook. The Justice Department last December filed a lawsuit accusing Facebook of giving hiring preferences to temporary workers including those who hold H-1B visas that let companies temporarily employ foreign workers in certain specialty occupations. Such visas are widely used by tech companies. Kristen Clarke, assistant attorney general for the Justice Department’s Civil Rights Division, called the agreement with Facebook historic. “It represents by far the largest civil penalty the Civil Rights Division has ever recovered in the 35-year history of the Immigration and Nationality Act’s anti-discrimination provision,” Clarke said in a call with reporters, referring to a key …