The first Tay Bridge collapsed in 1879. At least sixty were killed.
As engineering rose as a distinct profession during the 19th century, engineers saw themselves as either independent professional practitioners or technical employees of large enterprises. There was considerable tension between the two sides as large industrial employers fought to maintain control of their employees.
In the United States growing professionalism gave rise to the development of four founding engineering societies: The American Society of Civil Engineers (ASCE) (1851), the American Institute of Electrical Engineers (AIEE) (1884), the American Society of Mechanical Engineers (ASME) (1880), and the American Institute of Mining Engineers (AIME) (1871). ASCE and AIEE were more closely identified with the engineer as learned professional, where ASME, to an extent, and AIME almost entirely, identified with the view that the engineer is a technical employee.
Even so, at that time ethics was viewed as a personal rather than a broad professional concern.:6
Turning of the 20th century and turning point
The Boston molasses disaster provided a strong impetus for the establishment of professional licensing and codes of ethics in the United States.
One response was the development of formal codes of ethics by three of the four founding engineering societies. AIEE adopted theirs in 1912. ASCE and ASME did so in 1914. AIME did not adopt a code of ethics in its history.
Concerns for professional practice and protecting the public highlighted by these bridge failures, as well as the Boston molasses disaster (1919), provided impetus for another movement that had been underway for some time: to require formal credentials (Professional Engineering licensure in the US) as a requirement to practice. This involves meeting some combination of educational, experience, and testing requirements.
In 1950, the Association of German Engineers developed an oath for all its members titled 'The Confession of the Engineers', directly hinting at the role of engineers in the atrocities committed during World War II.
Over the following decades most American states and Canadian provinces either required engineers to be licensed, or passed special legislation reserving title rights to organization of professional engineers. The Canadian model is to require all persons working in fields of engineering that posed a risk to life, health, property, the public welfare and the environment to be licensed, and all provinces required licensing by the 1950s.
The US model has generally been only to require the practicing engineers offering engineering services that impact the public welfare, safety, safeguarding of life, health, or property to be licensed, while engineers working in private industry without a direct offering of engineering services to the public or other businesses, education, and government need not be licensed . This has perpetuated the split between professional engineers and those in private industry. Professional societies have adopted generally uniform codes of ethics.
William LeMessurier's response to design deficiencies uncovered after construction of the Citigroup Center is often cited as an example of ethical conduct.
Efforts to promote ethical practice continue. In addition to the professional societies and chartering organizations efforts with their members, the Canadian Iron Ring and American Order of the Engineer trace their roots to the 1907 Quebec Bridge collapse. Both require members to swear an oath to uphold ethical practice and wear a symbolic ring as a reminder.
In the United States, the National Society of Professional Engineers released in 1946 its Canons of Ethics for Engineers and Rules of Professional Conduct, which evolved to the current Code of Ethics, adopted in 1964. These requests ultimately led to the creation of the Board of Ethical Review in 1954. Ethics cases rarely have easy answers, but the BER's nearly 500 advisory opinions have helped bring clarity to the ethical issues engineers face daily.
Currently, bribery and political corruption is being addressed very directly by several professional societies and business groups around the world. However, new issues have arisen, such as offshoring, sustainable development, and environmental protection, that the profession is having to consider and address.
Engineers, in the fulfillment of their professional duties, shall hold paramount the safety, health, and welfare of the public
— National Society of Professional Engineers, 
A practitioner shall, regard the practitioner's duty to public welfare as paramount."
Codes of engineering ethics identify a specific precedence with respect to the engineer's consideration for the public, clients, employers, and the profession.
Many engineering professional societies have prepared codes of ethics. Some date to the early decades of the twentieth century. These have been incorporated to a greater or lesser degree into the regulatory laws of several jurisdictions. While these statements of general principles served as a guide, engineers still require sound judgment to interpret how the code would apply to specific circumstances.
The general principles of the codes of ethics are largely similar across the various engineering societies and chartering authorities of the world, which further extend the code and publish specific guidance. The following is an example from the American Society of Civil Engineers:
Engineers shall hold paramount the safety, health and welfare of the public and shall strive to comply with the principles of sustainable development in the performance of their professional duties.
Engineers shall perform services only in areas of their competence.
Engineers shall issue public statements only in an objective and truthful manner.
Engineers shall act in professional matters for each employer or client as faithful agents or trustees, and shall avoid conflicts of interest.
Engineers shall build their professional reputation on the merit of their services and shall not compete unfairly with others.
Engineers shall act in such a manner as to uphold and enhance the honor, integrity, and dignity of the engineering profession and shall act with zero-tolerance for bribery, fraud, and corruption.
Engineers shall continue their professional development throughout their careers, and shall provide opportunities for the professional development of those engineers under their supervision.
Engineers shall, in all matters related to their profession, treat all persons fairly and encourage equitable participation without regard to gender or gender identity, race, national origin, ethnicity, religion, age, sexual orientation, disability, political affiliation, or family, marital, or economic status.
Obligation to society
The paramount value recognized by engineers is the safety and welfare of the public. As demonstrated by the following selected excerpts, this is the case for professional engineering organizations in nearly every jurisdiction and engineering discipline:
Institute of Electrical and Electronics Engineers: "We, the members of the IEEE, … do hereby commit ourselves to the highest ethical and professional conduct and agree: 1. to accept responsibility in making decisions consistent with the safety, health and welfare of the public, and to disclose promptly factors that might endanger the public or the environment;"
Institution of Civil Engineers: "Members of the ICE should always be aware of their overriding responsibility to the public good. A member’s obligations to the client can never override this, and members of the ICE should not enter undertakings which compromise this responsibility. The ‘public good’ encompasses care and respect for the environment, and for humanity’s cultural, historical and archaeological heritage, as well as the primary responsibility members have to protect the health and well being of present and future generations."
Institute of Industrial Engineers: "Engineers uphold and advance the integrity, honor and dignity of the engineering profession by: 2. Being honest and impartial, and serving with fidelity the public, their employers and clients."
American Nuclear Society: "ANS members uphold and advance the integrity and honor of their professions by using their knowledge and skill for the enhancement of human welfare and the environment; being honest and impartial; serving with fidelity the public, their employers, and their clients; and striving to continuously improve the competence and prestige of their various professions."
Society of Fire Protection Engineers: "In the practice of their profession, fire protection engineers must maintain and constantly improve their competence and perform under a standard of professional behavior which requires adherence to the highest principles of ethical conduct with balanced regard for the interests of the public, clients, employers, colleagues, and the profession."
Responsibility of engineers
The engineers recognize that the greatest merit is the work and exercise their profession committed to serving society, attending to the welfare and progress of the majority.
By transforming nature for the benefit of mankind, engineers must increase their awareness of the world as the abode of humanity, their interest in the universe as a guarantee of overcoming their spirit, and knowledge of reality to make the world fairer and happier.
The engineer should reject any paper that is intended to harm the general interest, thus avoiding a situation that might be hazardous or threatening to the environment, life, health, or other rights of human beings.
It is an inescapable duty of the engineer to uphold the prestige of the profession, to ensure its proper discharge, and to maintain a professional demeanor rooted in ability, honesty, fortitude, temperance, magnanimity, modesty, honesty, and justice; with the consciousness of individual well-being subordinate to the social good.
The engineers and their employers must ensure the continuous improvement of their knowledge, particularly of their profession, disseminate their knowledge, share their experience, provide opportunities for education and training of workers, provide recognition, moral and material support to the schools where they studied, thus returning the benefits and opportunities they and their employers have received.
It is the responsibility of the engineers to carry out their work efficiently and to support the law. In particular, they must ensure compliance with the standards of worker protection as provided by the law.
As professionals, the engineers are expected to commit themselves to high standards of conduct (NSPE).  11/27/11
A basic ethical dilemma is that an engineer has the duty to report to the appropriate authority a possible risk to others from a client or employer failing to follow the engineer's directions. According to first principles, this duty overrides the duty to a client and/or employer. An engineer may be disciplined, or have their license revoked, even if the failure to report such a danger does not result in the loss of life or health.
In many cases, this duty can be discharged by advising the client of the consequences in a forthright matter, and ensuring the client takes the engineer's advice. In very rare cases, where even a governmental authority may not take appropriate action, the engineer can only discharge the duty by making the situation public. As a result, whistleblowing by professional engineers is not an unusual event, and courts have often sided with engineers in such cases, overruling duties to employers and confidentiality considerations that otherwise would have prevented the engineer from speaking out.
There are several other ethical issues that engineers may face. Some have to do with technical practice, but many others have to do with broader considerations of business conduct. These include:
Relationships with clients, consultants, competitors, and contractors
Ensuring legal compliance by clients, client's contractors, and others
The field of business ethics often overlaps and informs ethical decision making for engineers.
Case studies and key individuals
Petroski notes that most engineering failures are much more involved than simple technical mis-calculations and involve the failure of the design process or management culture. However, not all engineering failures involve ethical issues. The infamous collapse of the first Tacoma Narrows Bridge, and the losses of the Mars Polar Lander and Mars Climate Orbiter were technical and design process failures.
These episodes of engineering failure include ethical as well as technical issues.
^ASME member H.F.J. Porter had proposed as early as 1892 that the engineering societies adopt uniform membership, education, and licensing requirements as well as a code of ethics. (Layton (1986). pp. 45-46)