The data seems to have come from a publication of the Cato Institute titled "Terrorism and Immigration: A Risk Analysis". The paper's appendix includes "Table A.1. Identified Foreign Persons Who Attempted or Committed Terrorism on U.S. Soil, 1975-2015", which seems to be the source of the claim. The table does not list country of origin, which makes verifying the claim somewhat time consuming. However, startling fact is that the 9/11 attacks make up the vast majority of foreign-born terrorist murders in the United States for that period.
Those men were from Saudi Arabia (15), the United Arab Emirates (2), Egypt and Lebanon. The chart in split deaths in a single attack evenly across all perpetrators. So each of the 9/11 hijackers was listed as causing 157 fatalities. That would produce this chart:
Country Fatalities
------- ----------
Saudi Arabia 2355
United Arab Emirates 314
Egypt 157
Lebanon 157
Since there were 17 pre-9/11 murders and 24 post-9/11 foreign-born terrorist murders in the time period, that means the numbers in the chart are correct within the tens of people specified by the question. Whether or not the Cato Institute information is wrong, outdated or misleading, I haven't considered in this answer.
Digging a bit further into the paper, I found this very interesting chart:

And the conclusion:
Foreign-born terrorism on U.S. soil is a low-probability event that imposes high costs on its victims despite relatively small risks and low costs on Americans as a whole. From 1975 through 2015, the average chance of dying in an attack by a foreign-born terrorist on U.S. soil was 1 in 3,609,709 a year. For 30 of those 41 years, no Americans were killed on U.S. soil in terrorist attacks caused by foreigners or immigrants. Foreign-born terrorism is a hazard to American life, liberty, and private property, but it is manageable given the huge economic benefits of immigration and the small costs of terrorism. The United States government should continue to devote resources to screening immigrants and foreigners for terrorism or other threats, but large policy changes like an immigration or tourist moratorium would impose far greater costs than benefits.